aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorMario Six2019-01-21 09:18:12 +0100
committerMario Six2019-05-21 07:52:33 +0200
commit73df96a38e693312bc2d5b565bc439f3b98e63ea (patch)
tree17314f5acd8ca1a6992ac2881e75d7c42288f481 /arch/powerpc
parentba463c116963e87bf2377ef8e0cdf4967c48fea7 (diff)
mpc83xx: Migrate arbiter config to Kconfig
Migrate the arbiter configuration to Kconfig. Signed-off-by: Mario Six <mario.six@gdsys.cc>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/cpu/mpc83xx/Kconfig1
-rw-r--r--arch/powerpc/cpu/mpc83xx/arbiter/Kconfig139
-rw-r--r--arch/powerpc/cpu/mpc83xx/arbiter/arbiter.h28
-rw-r--r--arch/powerpc/cpu/mpc83xx/cpu_init.c29
-rw-r--r--arch/powerpc/cpu/mpc83xx/spl_minimal.c8
5 files changed, 173 insertions, 32 deletions
diff --git a/arch/powerpc/cpu/mpc83xx/Kconfig b/arch/powerpc/cpu/mpc83xx/Kconfig
index 9f7b3a2e019..8a3bb10466c 100644
--- a/arch/powerpc/cpu/mpc83xx/Kconfig
+++ b/arch/powerpc/cpu/mpc83xx/Kconfig
@@ -295,6 +295,7 @@ source "arch/powerpc/cpu/mpc83xx/lblaw/Kconfig"
source "arch/powerpc/cpu/mpc83xx/elbc/Kconfig"
source "arch/powerpc/cpu/mpc83xx/hid/Kconfig"
source "arch/powerpc/cpu/mpc83xx/sysio/Kconfig"
+source "arch/powerpc/cpu/mpc83xx/arbiter/Kconfig"
menu "Legacy options"
diff --git a/arch/powerpc/cpu/mpc83xx/arbiter/Kconfig b/arch/powerpc/cpu/mpc83xx/arbiter/Kconfig
new file mode 100644
index 00000000000..f562476da85
--- /dev/null
+++ b/arch/powerpc/cpu/mpc83xx/arbiter/Kconfig
@@ -0,0 +1,139 @@
+menu "Arbiter"
+
+choice
+ prompt "Pipeline depth"
+
+config ACR_PIPE_DEP_UNSET
+ bool "Don't set value"
+
+config ACR_PIPE_DEP_1
+ bool "1"
+
+config ACR_PIPE_DEP_2
+ bool "2"
+
+config ACR_PIPE_DEP_3
+ bool "3"
+
+config ACR_PIPE_DEP_4
+ bool "4"
+
+endchoice
+
+choice
+ prompt "Repeat count"
+
+config ACR_RPTCNT_UNSET
+ bool "Don't set value"
+
+config ACR_RPTCNT_1
+ bool "1"
+
+config ACR_RPTCNT_2
+ bool "2"
+
+config ACR_RPTCNT_3
+ bool "3"
+
+config ACR_RPTCNT_4
+ bool "4"
+
+config ACR_RPTCNT_5
+ bool "5"
+
+config ACR_RPTCNT_6
+ bool "6"
+
+config ACR_RPTCNT_7
+ bool "7"
+
+config ACR_RPTCNT_8
+ bool "8"
+
+endchoice
+
+choice
+ prompt "Address parking"
+
+config ACR_APARK_UNSET
+ bool "Don't set value"
+
+config ACR_APARK_MASTER
+ bool "Park to master"
+
+config ACR_APARK_LAST
+ bool "Park to last owner"
+
+config ACR_APARK_DISABLE
+ bool "Disabled"
+
+endchoice
+
+choice
+ prompt "Parking master"
+
+config ACR_PARKM_UNSET
+ bool "Don't set value"
+
+config ACR_PARKM_E300
+ bool "e300 core"
+
+config ACR_PARKM_TSEC_1_2
+ bool "TSEC1, TSEC2"
+
+config ACR_PARKM_USB_I2C1_BOOT
+ bool "USB/I2C1_BOOT"
+
+config ACR_PARKM_DMA_ESDHC_USB
+ bool "DMA, ESDHC, USB"
+
+config ACR_PARKM_PEX
+ bool "PCI Express"
+
+if MPC83XX_QUICC_ENGINE
+
+config ACR_PARKM_ENC_CORE
+ bool "Encryption core"
+
+endif
+
+endchoice
+
+config ACR_PIPE_DEP
+ hex
+ default 0x0 if ACR_PIPE_DEP_UNSET
+ default 0x0 if ACR_PIPE_DEP_1
+ default 0x10000 if ACR_PIPE_DEP_2
+ default 0x20000 if ACR_PIPE_DEP_3
+ default 0x30000 if ACR_PIPE_DEP_4
+
+config ACR_RPTCNT
+ hex
+ default 0x0 if ACR_RPTCNT_UNSET
+ default 0x0 if ACR_RPTCNT_1
+ default 0x100 if ACR_RPTCNT_2
+ default 0x200 if ACR_RPTCNT_3
+ default 0x300 if ACR_RPTCNT_4
+ default 0x400 if ACR_RPTCNT_5
+ default 0x500 if ACR_RPTCNT_6
+ default 0x600 if ACR_RPTCNT_7
+ default 0x700 if ACR_RPTCNT_8
+
+config ACR_APARK
+ hex
+ default 0x0 if ACR_APARK_UNSET
+ default 0x0 if ACR_APARK_MASTER
+ default 0x10 if ACR_APARK_LAST
+ default 0x20 if ACR_APARK_DISABLE
+
+config ACR_PARKM
+ hex
+ default 0x0 if ACR_PARKM_UNSET
+ default 0x0 if ACR_PARKM_E300
+ default 0x2 if ACR_PARKM_TSEC_1_2
+ default 0x3 if ACR_PARKM_USB_I2C1_BOOT
+ default 0x4 if ACR_PARKM_DMA_ESDHC_USB
+ default 0x5 if ACR_PARKM_PEX
+ default 0x5 if ACR_PARKM_ENC_CORE
+
+endmenu
diff --git a/arch/powerpc/cpu/mpc83xx/arbiter/arbiter.h b/arch/powerpc/cpu/mpc83xx/arbiter/arbiter.h
new file mode 100644
index 00000000000..10a47e49876
--- /dev/null
+++ b/arch/powerpc/cpu/mpc83xx/arbiter/arbiter.h
@@ -0,0 +1,28 @@
+ const __be32 acr_mask =
+#ifndef CONFIG_ACR_PIPE_DEP_UNSET
+ ACR_PIPE_DEP |
+#endif
+#ifndef CONFIG_ACR_RPTCNT_UNSET
+ ACR_RPTCNT |
+#endif
+#ifndef CONFIG_ACR_APARK_UNSET
+ ACR_APARK |
+#endif
+#ifndef CONFIG_ACR_PARKM_UNSET
+ ACR_PARKM |
+#endif
+ 0;
+ const __be32 acr_val =
+#ifndef CONFIG_ACR_PIPE_DEP_UNSET
+ CONFIG_ACR_PIPE_DEP |
+#endif
+#ifndef CONFIG_ACR_RPTCNT_UNSET
+ CONFIG_ACR_RPTCNT |
+#endif
+#ifndef CONFIG_ACR_APARK_UNSET
+ CONFIG_ACR_APARK |
+#endif
+#ifndef CONFIG_ACR_PARKM_UNSET
+ CONFIG_ACR_PARKM |
+#endif
+ 0;
diff --git a/arch/powerpc/cpu/mpc83xx/cpu_init.c b/arch/powerpc/cpu/mpc83xx/cpu_init.c
index 3df01ee1ca1..77502567a70 100644
--- a/arch/powerpc/cpu/mpc83xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc83xx/cpu_init.c
@@ -15,6 +15,7 @@
#include "lblaw/lblaw.h"
#include "elbc/elbc.h"
#include "sysio/sysio.h"
+#include "arbiter/arbiter.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -51,34 +52,6 @@ static void config_qe_ioports(void)
*/
void cpu_init_f (volatile immap_t * im)
{
- __be32 acr_mask =
-#ifdef CONFIG_SYS_ACR_PIPE_DEP /* Arbiter pipeline depth */
- ACR_PIPE_DEP |
-#endif
-#ifdef CONFIG_SYS_ACR_RPTCNT /* Arbiter repeat count */
- ACR_RPTCNT |
-#endif
-#ifdef CONFIG_SYS_ACR_APARK /* Arbiter address parking mode */
- ACR_APARK |
-#endif
-#ifdef CONFIG_SYS_ACR_PARKM /* Arbiter parking master */
- ACR_PARKM |
-#endif
- 0;
- __be32 acr_val =
-#ifdef CONFIG_SYS_ACR_PIPE_DEP /* Arbiter pipeline depth */
- (CONFIG_SYS_ACR_PIPE_DEP << ACR_PIPE_DEP_SHIFT) |
-#endif
-#ifdef CONFIG_SYS_ACR_RPTCNT /* Arbiter repeat count */
- (CONFIG_SYS_ACR_RPTCNT << ACR_RPTCNT_SHIFT) |
-#endif
-#ifdef CONFIG_SYS_ACR_APARK /* Arbiter address parking mode */
- (CONFIG_SYS_ACR_APARK << ACR_APARK_SHIFT) |
-#endif
-#ifdef CONFIG_SYS_ACR_PARKM /* Arbiter parking master */
- (CONFIG_SYS_ACR_PARKM << ACR_PARKM_SHIFT) |
-#endif
- 0;
__be32 spcr_mask =
#ifdef CONFIG_SYS_SPCR_OPT /* Optimize transactions between CSB and other dev */
SPCR_OPT |
diff --git a/arch/powerpc/cpu/mpc83xx/spl_minimal.c b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
index b4e2fb1119d..133f7abc31a 100644
--- a/arch/powerpc/cpu/mpc83xx/spl_minimal.c
+++ b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
@@ -27,16 +27,16 @@ void cpu_init_f (volatile immap_t * im)
/* system performance tweaking */
-#ifdef CONFIG_SYS_ACR_PIPE_DEP
+#ifndef CONFIG_ACR_PIPE_DEP_UNSET
/* Arbiter pipeline depth */
im->arbiter.acr = (im->arbiter.acr & ~ACR_PIPE_DEP) |
- (CONFIG_SYS_ACR_PIPE_DEP << ACR_PIPE_DEP_SHIFT);
+ CONFIG_ACR_PIPE_DEP;
#endif
-#ifdef CONFIG_SYS_ACR_RPTCNT
+#ifndef CONFIG_ACR_RPTCNT_UNSET
/* Arbiter repeat count */
im->arbiter.acr = (im->arbiter.acr & ~(ACR_RPTCNT)) |
- (CONFIG_SYS_ACR_RPTCNT << ACR_RPTCNT_SHIFT);
+ CONFIG_ACR_RPTCNT;
#endif
#ifdef CONFIG_SYS_SPCR_OPT