mips: ath79: Rename get_bootstrap into ath79_get_bootstrap
authorWills Wang <wills.wang@live.com>
Mon, 30 May 2016 14:54:50 +0000 (22:54 +0800)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tue, 31 May 2016 08:17:54 +0000 (10:17 +0200)
Add a platform prefix for function name in order to make more readable,
and move it into ath79.h

Signed-off-by: Wills Wang <wills.wang@live.com>
Acked-by: Marek Vasut <marex@denx.de>
arch/mips/mach-ath79/ar933x/clk.c
arch/mips/mach-ath79/ar933x/ddr.c
arch/mips/mach-ath79/ar934x/clk.c
arch/mips/mach-ath79/ar934x/ddr.c
arch/mips/mach-ath79/include/mach/ath79.h
arch/mips/mach-ath79/include/mach/reset.h [deleted file]
arch/mips/mach-ath79/qca953x/clk.c
arch/mips/mach-ath79/qca953x/ddr.c
arch/mips/mach-ath79/reset.c

index 9fcd4961f542607aa32ef71492d620fbe51d9f2f..6d98efc480d8740d1541c18ef9419b04e9ccf530 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/addrspace.h>
 #include <asm/types.h>
 #include <mach/ar71xx_regs.h>
-#include <mach/reset.h>
+#include <mach/ath79.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -17,7 +17,7 @@ static u32 ar933x_get_xtal(void)
 {
        u32 val;
 
-       val = get_bootstrap();
+       val = ath79_get_bootstrap();
        if (val & AR933X_BOOTSTRAP_REF_CLK_40)
                return 40000000;
        else
index 7f20d348855597f0fac635faffc79efe256bcd2e..2a25e23869ec69ecf8a26cecfec9514ce4e367a0 100644 (file)
@@ -10,7 +10,7 @@
 #include <asm/addrspace.h>
 #include <asm/types.h>
 #include <mach/ar71xx_regs.h>
-#include <mach/reset.h>
+#include <mach/ath79.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -114,7 +114,7 @@ void ddr_init(void)
        writel(DDR_CONF_REG_VAL, regs + AR71XX_DDR_REG_CONFIG);
        writel(DDR_CONF2_REG_VAL, regs + AR71XX_DDR_REG_CONFIG2);
 
-       val = get_bootstrap();
+       val = ath79_get_bootstrap();
        if (val & AR933X_BOOTSTRAP_DDR2) {
                /* AHB maximum timeout */
                writel(0xfffff, regs + AR933X_DDR_REG_TIMEOUT_MAX);
index 9c65184e7a63483e759abde56b1510d454b2ff17..9b41d3de60b615bb3a88f823d8bca1f76052791c 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/addrspace.h>
 #include <asm/types.h>
 #include <mach/ar71xx_regs.h>
-#include <mach/reset.h>
+#include <mach/ath79.h>
 #include <wait_bit.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -119,7 +119,7 @@ void ar934x_pll_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz)
        writel(0x03000000, srif_regs + 0x188); /* Undocumented reg :-) */
 
        /* Test for 40MHz XTAL */
-       reg = get_bootstrap();
+       reg = ath79_get_bootstrap();
        if (reg & AR934X_BOOTSTRAP_REF_CLK_40) {
                xtal_40 = 1;
                cpu_srif = 0x41c00000;
@@ -214,7 +214,7 @@ static u32 ar934x_get_xtal(void)
 {
        u32 val;
 
-       val = get_bootstrap();
+       val = ath79_get_bootstrap();
        if (val & AR934X_BOOTSTRAP_REF_CLK_40)
                return 40000000;
        else
index 4621d5845cd5b8be815024ac8aa10444c8c84714..2ba1efa3e3bd73578cf503b81fb48ddae0241b76 100644 (file)
@@ -11,7 +11,7 @@
 #include <asm/addrspace.h>
 #include <asm/types.h>
 #include <mach/ar71xx_regs.h>
-#include <mach/reset.h>
+#include <mach/ath79.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -45,7 +45,7 @@ void ar934x_ddr_init(const u16 cpu_mhz, const u16 ddr_mhz, const u16 ahb_mhz)
        ddr_regs = map_physmem(AR71XX_DDR_CTRL_BASE, AR71XX_DDR_CTRL_SIZE,
                               MAP_NOCACHE);
 
-       reg = get_bootstrap();
+       reg = ath79_get_bootstrap();
        if (reg & AR934X_BOOTSTRAP_SDRAM_DISABLED) {    /* DDR */
                if (reg & AR934X_BOOTSTRAP_DDR1) {      /* DDR 1 */
                        memtype = AR934X_DDR1;
index 17af08223f740621417c9c8f411c8e88af293435..582c0282e58d9831a087fff60d0d12d172406a5b 100644 (file)
@@ -140,6 +140,7 @@ static inline int soc_is_qca956x(void)
        return soc_is_tp9343() || soc_is_qca9561();
 }
 
+u32 ath79_get_bootstrap(void);
 int ath79_eth_reset(void);
 int ath79_usb_reset(void);
 
diff --git a/arch/mips/mach-ath79/include/mach/reset.h b/arch/mips/mach-ath79/include/mach/reset.h
deleted file mode 100644 (file)
index c383bfe..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifndef __ASM_MACH_RESET_H
-#define __ASM_MACH_RESET_H
-
-#include <linux/types.h>
-
-u32 get_bootstrap(void);
-
-#endif /* __ASM_MACH_RESET_H */
index ef0a28e5054a86986918d06fe64aeda7ec33a66f..533356c6a1c7a94a1c6ba759516719d378dcfb67 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/addrspace.h>
 #include <asm/types.h>
 #include <mach/ar71xx_regs.h>
-#include <mach/reset.h>
+#include <mach/ath79.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -17,7 +17,7 @@ static u32 qca953x_get_xtal(void)
 {
        u32 val;
 
-       val = get_bootstrap();
+       val = ath79_get_bootstrap();
        if (val & QCA953X_BOOTSTRAP_REF_CLK_40)
                return 40000000;
        else
index ac0130cff0eb36458274d0aa08d9056236cd7d4a..c6049d8958a47fa288f9e4155f963991cf7a9dd3 100644 (file)
@@ -10,7 +10,7 @@
 #include <asm/addrspace.h>
 #include <asm/types.h>
 #include <mach/ar71xx_regs.h>
-#include <mach/reset.h>
+#include <mach/ath79.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -226,7 +226,7 @@ void ddr_init(void)
 
        regs = map_physmem(AR71XX_DDR_CTRL_BASE, AR71XX_DDR_CTRL_SIZE,
                           MAP_NOCACHE);
-       val = get_bootstrap();
+       val = ath79_get_bootstrap();
        if (val & QCA953X_BOOTSTRAP_DDR1) {
                writel(DDR_CTL_CONFIG_VAL, regs + QCA953X_DDR_REG_CTL_CONF);
                udelay(10);
index a88bcbcfe21e2dbe2f947ca4cabd5972468af559..33bf979ce0025c72a6b5cba43887e6a84e2b134d 100644 (file)
@@ -45,7 +45,7 @@ void _machine_restart(void)
                /* NOP */;
 }
 
-u32 get_bootstrap(void)
+u32 ath79_get_bootstrap(void)
 {
        void __iomem *base;
        u32 reg = 0;