soc/fsl/qe: get rid of immrbar_virt_to_phys()
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 7 Feb 2017 09:05:11 +0000 (10:05 +0100)
committerScott Wood <oss@buserror.net>
Sun, 30 Apr 2017 06:26:54 +0000 (01:26 -0500)
immrbar_virt_to_phys() is not used anymore

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Acked-by: Li Yang <pku.leo@gmail.com>
Signed-off-by: Scott Wood <oss@buserror.net>
drivers/soc/fsl/qe/qe.c
include/soc/fsl/qe/immap_qe.h

index ade168f5328e7fac1e68c4d55004cf94ac842f72..d9c04f588f7f3cb2ab1170712c87b4d160384457 100644 (file)
@@ -66,7 +66,7 @@ static unsigned int qe_num_of_snum;
 
 static phys_addr_t qebase = -1;
 
-phys_addr_t get_qe_base(void)
+static phys_addr_t get_qe_base(void)
 {
        struct device_node *qe;
        int ret;
@@ -90,8 +90,6 @@ phys_addr_t get_qe_base(void)
        return qebase;
 }
 
-EXPORT_SYMBOL(get_qe_base);
-
 void qe_reset(void)
 {
        if (qe_immr == NULL)
index c76ef30b05ba38ff517972125282c33ecc41b8eb..7baaabd5ec2ced0bf227691bdfea94ba9c53a0e4 100644 (file)
@@ -464,25 +464,6 @@ struct qe_immap {
 } __attribute__ ((packed));
 
 extern struct qe_immap __iomem *qe_immr;
-extern phys_addr_t get_qe_base(void);
-
-/*
- * Returns the offset within the QE address space of the given pointer.
- *
- * Note that the QE does not support 36-bit physical addresses, so if
- * get_qe_base() returns a number above 4GB, the caller will probably fail.
- */
-static inline phys_addr_t immrbar_virt_to_phys(void *address)
-{
-       void *q = (void *)qe_immr;
-
-       /* Is it a MURAM address? */
-       if ((address >= q) && (address < (q + QE_IMMAP_SIZE)))
-               return get_qe_base() + (address - q);
-
-       /* It's an address returned by kmalloc */
-       return virt_to_phys(address);
-}
 
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_IMMAP_QE_H */