diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-02 23:00:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-02 23:00:54 -0400 |
commit | b55a0ff8df92646696c858a8fea4dbf38509f202 (patch) | |
tree | 9b3fb1da94093e5147b1ef5bcd5277f9187c32cd | |
parent | a727eaf64ff084a50b983fc506810c7a576b7ce3 (diff) | |
parent | 83c6bdb827c9422fe6e02130d9546800143304c1 (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu into next
Pull m68knommu updates from Greg Ungerer:
"Nothing too big, just a handfull of small changes.
A couple of dragonball fixes, coldfire qspi cleanup and fixes, and
some coldfire gpio cleanup, fixes and extensions"
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
m68knommu: Implement gpio support for m54xx.
m68knommu: Make everything thats not exported, static.
m68knommu: setting the gpio data direction register to output doesn't dependent upon the value to output!
m68knommu: add to_irq function so we can map gpios to external interrupts.
m68knommu: qspi declutter.
m68knommu: Fix the 5249/525x qspi base address.
m68knommu: Add qspi clk for Coldfire SoCs without real clks.
m68k: fix a compiler warning when building for DragonBall
m68knommu: Fix mach_sched_init for EZ and VZ DragonBall chips
-rw-r--r-- | arch/m68k/include/asm/m525xsim.h | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/m54xxsim.h | 12 | ||||
-rw-r--r-- | arch/m68k/include/asm/mcfgpio.h | 12 | ||||
-rw-r--r-- | arch/m68k/kernel/setup_no.c | 13 | ||||
-rw-r--r-- | arch/m68k/platform/68000/m68EZ328.c | 3 | ||||
-rw-r--r-- | arch/m68k/platform/68000/m68VZ328.c | 1 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/gpio.c | 34 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/m520x.c | 8 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/m523x.c | 10 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/m5249.c | 10 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/m525x.c | 2 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/m5272.c | 2 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/m527x.c | 10 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/m528x.c | 10 | ||||
-rw-r--r-- | arch/m68k/platform/coldfire/m53xx.c | 8 |
15 files changed, 74 insertions, 63 deletions
diff --git a/arch/m68k/include/asm/m525xsim.h b/arch/m68k/include/asm/m525xsim.h index e33f5bb6aca8..f186459072e9 100644 --- a/arch/m68k/include/asm/m525xsim.h +++ b/arch/m68k/include/asm/m525xsim.h | |||
@@ -105,7 +105,7 @@ | |||
105 | /* | 105 | /* |
106 | * QSPI module. | 106 | * QSPI module. |
107 | */ | 107 | */ |
108 | #define MCFQSPI_BASE (MCF_MBAR + 0x300) /* Base address QSPI */ | 108 | #define MCFQSPI_BASE (MCF_MBAR + 0x400) /* Base address QSPI */ |
109 | #define MCFQSPI_SIZE 0x40 /* Register set size */ | 109 | #define MCFQSPI_SIZE 0x40 /* Register set size */ |
110 | 110 | ||
111 | #ifdef CONFIG_M5249 | 111 | #ifdef CONFIG_M5249 |
diff --git a/arch/m68k/include/asm/m54xxsim.h b/arch/m68k/include/asm/m54xxsim.h index d3bd83887429..a5fbd17ab0a5 100644 --- a/arch/m68k/include/asm/m54xxsim.h +++ b/arch/m68k/include/asm/m54xxsim.h | |||
@@ -55,9 +55,15 @@ | |||
55 | /* | 55 | /* |
56 | * Generic GPIO support | 56 | * Generic GPIO support |
57 | */ | 57 | */ |
58 | #define MCFGPIO_PIN_MAX 0 /* I am too lazy to count */ | 58 | #define MCFGPIO_PODR (MCF_MBAR + 0xA00) |
59 | #define MCFGPIO_IRQ_MAX -1 | 59 | #define MCFGPIO_PDDR (MCF_MBAR + 0xA10) |
60 | #define MCFGPIO_IRQ_VECBASE -1 | 60 | #define MCFGPIO_PPDR (MCF_MBAR + 0xA20) |
61 | #define MCFGPIO_SETR (MCF_MBAR + 0xA20) | ||
62 | #define MCFGPIO_CLRR (MCF_MBAR + 0xA30) | ||
63 | |||
64 | #define MCFGPIO_PIN_MAX 136 /* 128 gpio + 8 eport */ | ||
65 | #define MCFGPIO_IRQ_MAX 8 | ||
66 | #define MCFGPIO_IRQ_VECBASE MCFINT_VECBASE | ||
61 | 67 | ||
62 | /* | 68 | /* |
63 | * EDGE Port support. | 69 | * EDGE Port support. |
diff --git a/arch/m68k/include/asm/mcfgpio.h b/arch/m68k/include/asm/mcfgpio.h index c41ebf45f1d0..66203c334c6f 100644 --- a/arch/m68k/include/asm/mcfgpio.h +++ b/arch/m68k/include/asm/mcfgpio.h | |||
@@ -139,7 +139,8 @@ static inline void gpio_free(unsigned gpio) | |||
139 | 139 | ||
140 | #if defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ | 140 | #if defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ |
141 | defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ | 141 | defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ |
142 | defined(CONFIG_M53xx) || defined(CONFIG_M5441x) | 142 | defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ |
143 | defined(CONFIG_M5441x) | ||
143 | /* | 144 | /* |
144 | * These parts have an 'Edge' Port module (external interrupt/GPIO) which uses | 145 | * These parts have an 'Edge' Port module (external interrupt/GPIO) which uses |
145 | * read-modify-write to change an output and a GPIO module which has separate | 146 | * read-modify-write to change an output and a GPIO module which has separate |
@@ -195,7 +196,8 @@ static inline u32 __mcfgpio_ppdr(unsigned gpio) | |||
195 | return MCFSIM2_GPIO1READ; | 196 | return MCFSIM2_GPIO1READ; |
196 | #elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ | 197 | #elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ |
197 | defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ | 198 | defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ |
198 | defined(CONFIG_M53xx) || defined(CONFIG_M5441x) | 199 | defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ |
200 | defined(CONFIG_M5441x) | ||
199 | #if !defined(CONFIG_M5441x) | 201 | #if !defined(CONFIG_M5441x) |
200 | if (gpio < 8) | 202 | if (gpio < 8) |
201 | return MCFEPORT_EPPDR; | 203 | return MCFEPORT_EPPDR; |
@@ -237,7 +239,8 @@ static inline u32 __mcfgpio_podr(unsigned gpio) | |||
237 | return MCFSIM2_GPIO1WRITE; | 239 | return MCFSIM2_GPIO1WRITE; |
238 | #elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ | 240 | #elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ |
239 | defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ | 241 | defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ |
240 | defined(CONFIG_M53xx) || defined(CONFIG_M5441x) | 242 | defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ |
243 | defined(CONFIG_M5441x) | ||
241 | #if !defined(CONFIG_M5441x) | 244 | #if !defined(CONFIG_M5441x) |
242 | if (gpio < 8) | 245 | if (gpio < 8) |
243 | return MCFEPORT_EPDR; | 246 | return MCFEPORT_EPDR; |
@@ -279,7 +282,8 @@ static inline u32 __mcfgpio_pddr(unsigned gpio) | |||
279 | return MCFSIM2_GPIO1ENABLE; | 282 | return MCFSIM2_GPIO1ENABLE; |
280 | #elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ | 283 | #elif defined(CONFIG_M520x) || defined(CONFIG_M523x) || \ |
281 | defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ | 284 | defined(CONFIG_M527x) || defined(CONFIG_M528x) || \ |
282 | defined(CONFIG_M53xx) || defined(CONFIG_M5441x) | 285 | defined(CONFIG_M53xx) || defined(CONFIG_M54xx) || \ |
286 | defined(CONFIG_M5441x) | ||
283 | #if !defined(CONFIG_M5441x) | 287 | #if !defined(CONFIG_M5441x) |
284 | if (gpio < 8) | 288 | if (gpio < 8) |
285 | return MCFEPORT_EPDDR; | 289 | return MCFEPORT_EPDDR; |
diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c index 5b16f5d61b44..88c27d94a721 100644 --- a/arch/m68k/kernel/setup_no.c +++ b/arch/m68k/kernel/setup_no.c | |||
@@ -58,17 +58,16 @@ void (*mach_halt)(void); | |||
58 | void (*mach_power_off)(void); | 58 | void (*mach_power_off)(void); |
59 | 59 | ||
60 | #ifdef CONFIG_M68000 | 60 | #ifdef CONFIG_M68000 |
61 | #define CPU_NAME "MC68000" | 61 | #if defined(CONFIG_M68328) |
62 | #endif | ||
63 | #ifdef CONFIG_M68328 | ||
64 | #define CPU_NAME "MC68328" | 62 | #define CPU_NAME "MC68328" |
65 | #endif | 63 | #elif defined(CONFIG_M68EZ328) |
66 | #ifdef CONFIG_M68EZ328 | ||
67 | #define CPU_NAME "MC68EZ328" | 64 | #define CPU_NAME "MC68EZ328" |
68 | #endif | 65 | #elif defined(CONFIG_M68VZ328) |
69 | #ifdef CONFIG_M68VZ328 | ||
70 | #define CPU_NAME "MC68VZ328" | 66 | #define CPU_NAME "MC68VZ328" |
67 | #else | ||
68 | #define CPU_NAME "MC68000" | ||
71 | #endif | 69 | #endif |
70 | #endif /* CONFIG_M68000 */ | ||
72 | #ifdef CONFIG_M68360 | 71 | #ifdef CONFIG_M68360 |
73 | #define CPU_NAME "MC68360" | 72 | #define CPU_NAME "MC68360" |
74 | #endif | 73 | #endif |
diff --git a/arch/m68k/platform/68000/m68EZ328.c b/arch/m68k/platform/68000/m68EZ328.c index 332b5e8605fc..21952906e9e2 100644 --- a/arch/m68k/platform/68000/m68EZ328.c +++ b/arch/m68k/platform/68000/m68EZ328.c | |||
@@ -69,7 +69,8 @@ void __init config_BSP(char *command, int len) | |||
69 | if (p) strcpy(p,command); | 69 | if (p) strcpy(p,command); |
70 | else command[0] = 0; | 70 | else command[0] = 0; |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | mach_sched_init = hw_timer_init; | ||
73 | mach_hwclk = m68328_hwclk; | 74 | mach_hwclk = m68328_hwclk; |
74 | mach_reset = m68ez328_reset; | 75 | mach_reset = m68ez328_reset; |
75 | } | 76 | } |
diff --git a/arch/m68k/platform/68000/m68VZ328.c b/arch/m68k/platform/68000/m68VZ328.c index fd6658358af1..0e5e5a10a021 100644 --- a/arch/m68k/platform/68000/m68VZ328.c +++ b/arch/m68k/platform/68000/m68VZ328.c | |||
@@ -182,6 +182,7 @@ void __init config_BSP(char *command, int size) | |||
182 | 182 | ||
183 | init_hardware(command, size); | 183 | init_hardware(command, size); |
184 | 184 | ||
185 | mach_sched_init = hw_timer_init; | ||
185 | mach_hwclk = m68328_hwclk; | 186 | mach_hwclk = m68328_hwclk; |
186 | mach_reset = m68vz328_reset; | 187 | mach_reset = m68vz328_reset; |
187 | } | 188 | } |
diff --git a/arch/m68k/platform/coldfire/gpio.c b/arch/m68k/platform/coldfire/gpio.c index 9cd2b5c70519..e7e428681ec5 100644 --- a/arch/m68k/platform/coldfire/gpio.c +++ b/arch/m68k/platform/coldfire/gpio.c | |||
@@ -76,10 +76,7 @@ int __mcfgpio_direction_output(unsigned gpio, int value) | |||
76 | 76 | ||
77 | local_irq_save(flags); | 77 | local_irq_save(flags); |
78 | data = mcfgpio_read(__mcfgpio_pddr(gpio)); | 78 | data = mcfgpio_read(__mcfgpio_pddr(gpio)); |
79 | if (value) | 79 | data |= mcfgpio_bit(gpio); |
80 | data |= mcfgpio_bit(gpio); | ||
81 | else | ||
82 | data &= mcfgpio_bit(gpio); | ||
83 | mcfgpio_write(data, __mcfgpio_pddr(gpio)); | 80 | mcfgpio_write(data, __mcfgpio_pddr(gpio)); |
84 | 81 | ||
85 | /* now set the data to output */ | 82 | /* now set the data to output */ |
@@ -117,37 +114,51 @@ EXPORT_SYMBOL(__mcfgpio_free); | |||
117 | 114 | ||
118 | #ifdef CONFIG_GPIOLIB | 115 | #ifdef CONFIG_GPIOLIB |
119 | 116 | ||
120 | int mcfgpio_direction_input(struct gpio_chip *chip, unsigned offset) | 117 | static int mcfgpio_direction_input(struct gpio_chip *chip, unsigned offset) |
121 | { | 118 | { |
122 | return __mcfgpio_direction_input(offset); | 119 | return __mcfgpio_direction_input(offset); |
123 | } | 120 | } |
124 | 121 | ||
125 | int mcfgpio_get_value(struct gpio_chip *chip, unsigned offset) | 122 | static int mcfgpio_get_value(struct gpio_chip *chip, unsigned offset) |
126 | { | 123 | { |
127 | return __mcfgpio_get_value(offset); | 124 | return __mcfgpio_get_value(offset); |
128 | } | 125 | } |
129 | 126 | ||
130 | int mcfgpio_direction_output(struct gpio_chip *chip, unsigned offset, int value) | 127 | static int mcfgpio_direction_output(struct gpio_chip *chip, unsigned offset, |
128 | int value) | ||
131 | { | 129 | { |
132 | return __mcfgpio_direction_output(offset, value); | 130 | return __mcfgpio_direction_output(offset, value); |
133 | } | 131 | } |
134 | 132 | ||
135 | void mcfgpio_set_value(struct gpio_chip *chip, unsigned offset, int value) | 133 | static void mcfgpio_set_value(struct gpio_chip *chip, unsigned offset, |
134 | int value) | ||
136 | { | 135 | { |
137 | __mcfgpio_set_value(offset, value); | 136 | __mcfgpio_set_value(offset, value); |
138 | } | 137 | } |
139 | 138 | ||
140 | int mcfgpio_request(struct gpio_chip *chip, unsigned offset) | 139 | static int mcfgpio_request(struct gpio_chip *chip, unsigned offset) |
141 | { | 140 | { |
142 | return __mcfgpio_request(offset); | 141 | return __mcfgpio_request(offset); |
143 | } | 142 | } |
144 | 143 | ||
145 | void mcfgpio_free(struct gpio_chip *chip, unsigned offset) | 144 | static void mcfgpio_free(struct gpio_chip *chip, unsigned offset) |
146 | { | 145 | { |
147 | __mcfgpio_free(offset); | 146 | __mcfgpio_free(offset); |
148 | } | 147 | } |
149 | 148 | ||
150 | struct bus_type mcfgpio_subsys = { | 149 | static int mcfgpio_to_irq(struct gpio_chip *chip, unsigned offset) |
150 | { | ||
151 | #if defined(MCFGPIO_IRQ_MIN) | ||
152 | if ((offset >= MCFGPIO_IRQ_MIN) && (offset < MCFGPIO_IRQ_MAX)) | ||
153 | #else | ||
154 | if (offset < MCFGPIO_IRQ_MAX) | ||
155 | #endif | ||
156 | return MCFGPIO_IRQ_VECBASE + offset; | ||
157 | else | ||
158 | return -EINVAL; | ||
159 | } | ||
160 | |||
161 | static struct bus_type mcfgpio_subsys = { | ||
151 | .name = "gpio", | 162 | .name = "gpio", |
152 | .dev_name = "gpio", | 163 | .dev_name = "gpio", |
153 | }; | 164 | }; |
@@ -160,6 +171,7 @@ static struct gpio_chip mcfgpio_chip = { | |||
160 | .direction_output = mcfgpio_direction_output, | 171 | .direction_output = mcfgpio_direction_output, |
161 | .get = mcfgpio_get_value, | 172 | .get = mcfgpio_get_value, |
162 | .set = mcfgpio_set_value, | 173 | .set = mcfgpio_set_value, |
174 | .to_irq = mcfgpio_to_irq, | ||
163 | .base = 0, | 175 | .base = 0, |
164 | .ngpio = MCFGPIO_PIN_MAX, | 176 | .ngpio = MCFGPIO_PIN_MAX, |
165 | }; | 177 | }; |
diff --git a/arch/m68k/platform/coldfire/m520x.c b/arch/m68k/platform/coldfire/m520x.c index ea1be0e98ad6..4040a3c93733 100644 --- a/arch/m68k/platform/coldfire/m520x.c +++ b/arch/m68k/platform/coldfire/m520x.c | |||
@@ -118,10 +118,9 @@ static void __init m520x_clk_init(void) | |||
118 | 118 | ||
119 | /***************************************************************************/ | 119 | /***************************************************************************/ |
120 | 120 | ||
121 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
122 | |||
123 | static void __init m520x_qspi_init(void) | 121 | static void __init m520x_qspi_init(void) |
124 | { | 122 | { |
123 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
125 | u16 par; | 124 | u16 par; |
126 | /* setup Port QS for QSPI with gpio CS control */ | 125 | /* setup Port QS for QSPI with gpio CS control */ |
127 | writeb(0x3f, MCF_GPIO_PAR_QSPI); | 126 | writeb(0x3f, MCF_GPIO_PAR_QSPI); |
@@ -129,9 +128,8 @@ static void __init m520x_qspi_init(void) | |||
129 | par = readw(MCF_GPIO_PAR_UART); | 128 | par = readw(MCF_GPIO_PAR_UART); |
130 | par &= 0x00ff; | 129 | par &= 0x00ff; |
131 | writew(par, MCF_GPIO_PAR_UART); | 130 | writew(par, MCF_GPIO_PAR_UART); |
132 | } | ||
133 | |||
134 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ | 131 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
132 | } | ||
135 | 133 | ||
136 | /***************************************************************************/ | 134 | /***************************************************************************/ |
137 | 135 | ||
@@ -176,9 +174,7 @@ void __init config_BSP(char *commandp, int size) | |||
176 | m520x_clk_init(); | 174 | m520x_clk_init(); |
177 | m520x_uarts_init(); | 175 | m520x_uarts_init(); |
178 | m520x_fec_init(); | 176 | m520x_fec_init(); |
179 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
180 | m520x_qspi_init(); | 177 | m520x_qspi_init(); |
181 | #endif | ||
182 | } | 178 | } |
183 | 179 | ||
184 | /***************************************************************************/ | 180 | /***************************************************************************/ |
diff --git a/arch/m68k/platform/coldfire/m523x.c b/arch/m68k/platform/coldfire/m523x.c index 2b10e9f198cd..6b7135e6d5b4 100644 --- a/arch/m68k/platform/coldfire/m523x.c +++ b/arch/m68k/platform/coldfire/m523x.c | |||
@@ -32,6 +32,7 @@ DEFINE_CLK(mcfpit3, "mcfpit.3", MCF_CLK); | |||
32 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); | 32 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); |
33 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); | 33 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); |
34 | DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); | 34 | DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); |
35 | DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); | ||
35 | DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); | 36 | DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); |
36 | 37 | ||
37 | struct clk *mcf_clks[] = { | 38 | struct clk *mcf_clks[] = { |
@@ -44,16 +45,16 @@ struct clk *mcf_clks[] = { | |||
44 | &clk_mcfuart0, | 45 | &clk_mcfuart0, |
45 | &clk_mcfuart1, | 46 | &clk_mcfuart1, |
46 | &clk_mcfuart2, | 47 | &clk_mcfuart2, |
48 | &clk_mcfqspi0, | ||
47 | &clk_fec0, | 49 | &clk_fec0, |
48 | NULL | 50 | NULL |
49 | }; | 51 | }; |
50 | 52 | ||
51 | /***************************************************************************/ | 53 | /***************************************************************************/ |
52 | 54 | ||
53 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
54 | |||
55 | static void __init m523x_qspi_init(void) | 55 | static void __init m523x_qspi_init(void) |
56 | { | 56 | { |
57 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
57 | u16 par; | 58 | u16 par; |
58 | 59 | ||
59 | /* setup QSPS pins for QSPI with gpio CS control */ | 60 | /* setup QSPS pins for QSPI with gpio CS control */ |
@@ -62,9 +63,8 @@ static void __init m523x_qspi_init(void) | |||
62 | par = readw(MCFGPIO_PAR_TIMER); | 63 | par = readw(MCFGPIO_PAR_TIMER); |
63 | par &= 0x3f3f; | 64 | par &= 0x3f3f; |
64 | writew(par, MCFGPIO_PAR_TIMER); | 65 | writew(par, MCFGPIO_PAR_TIMER); |
65 | } | ||
66 | |||
67 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ | 66 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
67 | } | ||
68 | 68 | ||
69 | /***************************************************************************/ | 69 | /***************************************************************************/ |
70 | 70 | ||
@@ -80,9 +80,7 @@ void __init config_BSP(char *commandp, int size) | |||
80 | { | 80 | { |
81 | mach_sched_init = hw_timer_init; | 81 | mach_sched_init = hw_timer_init; |
82 | m523x_fec_init(); | 82 | m523x_fec_init(); |
83 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
84 | m523x_qspi_init(); | 83 | m523x_qspi_init(); |
85 | #endif | ||
86 | } | 84 | } |
87 | 85 | ||
88 | /***************************************************************************/ | 86 | /***************************************************************************/ |
diff --git a/arch/m68k/platform/coldfire/m5249.c b/arch/m68k/platform/coldfire/m5249.c index c80b5e51d29a..f6253a3313b3 100644 --- a/arch/m68k/platform/coldfire/m5249.c +++ b/arch/m68k/platform/coldfire/m5249.c | |||
@@ -26,6 +26,7 @@ DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); | |||
26 | DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); | 26 | DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); |
27 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); | 27 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); |
28 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); | 28 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); |
29 | DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); | ||
29 | 30 | ||
30 | struct clk *mcf_clks[] = { | 31 | struct clk *mcf_clks[] = { |
31 | &clk_pll, | 32 | &clk_pll, |
@@ -34,6 +35,7 @@ struct clk *mcf_clks[] = { | |||
34 | &clk_mcftmr1, | 35 | &clk_mcftmr1, |
35 | &clk_mcfuart0, | 36 | &clk_mcfuart0, |
36 | &clk_mcfuart1, | 37 | &clk_mcfuart1, |
38 | &clk_mcfqspi0, | ||
37 | NULL | 39 | NULL |
38 | }; | 40 | }; |
39 | 41 | ||
@@ -71,17 +73,15 @@ static struct platform_device *m5249_devices[] __initdata = { | |||
71 | 73 | ||
72 | /***************************************************************************/ | 74 | /***************************************************************************/ |
73 | 75 | ||
74 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
75 | |||
76 | static void __init m5249_qspi_init(void) | 76 | static void __init m5249_qspi_init(void) |
77 | { | 77 | { |
78 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
78 | /* QSPI irq setup */ | 79 | /* QSPI irq setup */ |
79 | writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL4 | MCFSIM_ICR_PRI0, | 80 | writeb(MCFSIM_ICR_AUTOVEC | MCFSIM_ICR_LEVEL4 | MCFSIM_ICR_PRI0, |
80 | MCFSIM_QSPIICR); | 81 | MCFSIM_QSPIICR); |
81 | mcf_mapirq2imr(MCF_IRQ_QSPI, MCFINTC_QSPI); | 82 | mcf_mapirq2imr(MCF_IRQ_QSPI, MCFINTC_QSPI); |
82 | } | ||
83 | |||
84 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ | 83 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
84 | } | ||
85 | 85 | ||
86 | /***************************************************************************/ | 86 | /***************************************************************************/ |
87 | 87 | ||
@@ -110,9 +110,7 @@ void __init config_BSP(char *commandp, int size) | |||
110 | #ifdef CONFIG_M5249C3 | 110 | #ifdef CONFIG_M5249C3 |
111 | m5249_smc91x_init(); | 111 | m5249_smc91x_init(); |
112 | #endif | 112 | #endif |
113 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
114 | m5249_qspi_init(); | 113 | m5249_qspi_init(); |
115 | #endif | ||
116 | } | 114 | } |
117 | 115 | ||
118 | /***************************************************************************/ | 116 | /***************************************************************************/ |
diff --git a/arch/m68k/platform/coldfire/m525x.c b/arch/m68k/platform/coldfire/m525x.c index 5b9f657b2df0..1adba3909035 100644 --- a/arch/m68k/platform/coldfire/m525x.c +++ b/arch/m68k/platform/coldfire/m525x.c | |||
@@ -26,6 +26,7 @@ DEFINE_CLK(mcftmr0, "mcftmr.0", MCF_BUSCLK); | |||
26 | DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); | 26 | DEFINE_CLK(mcftmr1, "mcftmr.1", MCF_BUSCLK); |
27 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); | 27 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); |
28 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); | 28 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); |
29 | DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); | ||
29 | 30 | ||
30 | struct clk *mcf_clks[] = { | 31 | struct clk *mcf_clks[] = { |
31 | &clk_pll, | 32 | &clk_pll, |
@@ -34,6 +35,7 @@ struct clk *mcf_clks[] = { | |||
34 | &clk_mcftmr1, | 35 | &clk_mcftmr1, |
35 | &clk_mcfuart0, | 36 | &clk_mcfuart0, |
36 | &clk_mcfuart1, | 37 | &clk_mcfuart1, |
38 | &clk_mcfqspi0, | ||
37 | NULL | 39 | NULL |
38 | }; | 40 | }; |
39 | 41 | ||
diff --git a/arch/m68k/platform/coldfire/m5272.c b/arch/m68k/platform/coldfire/m5272.c index a8c5856fe5ec..8a4d3cc322c6 100644 --- a/arch/m68k/platform/coldfire/m5272.c +++ b/arch/m68k/platform/coldfire/m5272.c | |||
@@ -39,6 +39,7 @@ DEFINE_CLK(mcftmr2, "mcftmr.2", MCF_BUSCLK); | |||
39 | DEFINE_CLK(mcftmr3, "mcftmr.3", MCF_BUSCLK); | 39 | DEFINE_CLK(mcftmr3, "mcftmr.3", MCF_BUSCLK); |
40 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); | 40 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); |
41 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); | 41 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); |
42 | DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); | ||
42 | DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); | 43 | DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); |
43 | 44 | ||
44 | struct clk *mcf_clks[] = { | 45 | struct clk *mcf_clks[] = { |
@@ -50,6 +51,7 @@ struct clk *mcf_clks[] = { | |||
50 | &clk_mcftmr3, | 51 | &clk_mcftmr3, |
51 | &clk_mcfuart0, | 52 | &clk_mcfuart0, |
52 | &clk_mcfuart1, | 53 | &clk_mcfuart1, |
54 | &clk_mcfqspi0, | ||
53 | &clk_fec0, | 55 | &clk_fec0, |
54 | NULL | 56 | NULL |
55 | }; | 57 | }; |
diff --git a/arch/m68k/platform/coldfire/m527x.c b/arch/m68k/platform/coldfire/m527x.c index 6fbfe9096c3e..62d81ef016f1 100644 --- a/arch/m68k/platform/coldfire/m527x.c +++ b/arch/m68k/platform/coldfire/m527x.c | |||
@@ -33,6 +33,7 @@ DEFINE_CLK(mcfpit3, "mcfpit.3", MCF_CLK); | |||
33 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); | 33 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); |
34 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); | 34 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); |
35 | DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); | 35 | DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); |
36 | DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); | ||
36 | DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); | 37 | DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); |
37 | DEFINE_CLK(fec1, "fec.1", MCF_BUSCLK); | 38 | DEFINE_CLK(fec1, "fec.1", MCF_BUSCLK); |
38 | 39 | ||
@@ -46,6 +47,7 @@ struct clk *mcf_clks[] = { | |||
46 | &clk_mcfuart0, | 47 | &clk_mcfuart0, |
47 | &clk_mcfuart1, | 48 | &clk_mcfuart1, |
48 | &clk_mcfuart2, | 49 | &clk_mcfuart2, |
50 | &clk_mcfqspi0, | ||
49 | &clk_fec0, | 51 | &clk_fec0, |
50 | &clk_fec1, | 52 | &clk_fec1, |
51 | NULL | 53 | NULL |
@@ -53,10 +55,9 @@ struct clk *mcf_clks[] = { | |||
53 | 55 | ||
54 | /***************************************************************************/ | 56 | /***************************************************************************/ |
55 | 57 | ||
56 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
57 | |||
58 | static void __init m527x_qspi_init(void) | 58 | static void __init m527x_qspi_init(void) |
59 | { | 59 | { |
60 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
60 | #if defined(CONFIG_M5271) | 61 | #if defined(CONFIG_M5271) |
61 | u16 par; | 62 | u16 par; |
62 | 63 | ||
@@ -70,9 +71,8 @@ static void __init m527x_qspi_init(void) | |||
70 | /* setup QSPS pins for QSPI with gpio CS control */ | 71 | /* setup QSPS pins for QSPI with gpio CS control */ |
71 | writew(0x003e, MCFGPIO_PAR_QSPI); | 72 | writew(0x003e, MCFGPIO_PAR_QSPI); |
72 | #endif | 73 | #endif |
73 | } | ||
74 | |||
75 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ | 74 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
75 | } | ||
76 | 76 | ||
77 | /***************************************************************************/ | 77 | /***************************************************************************/ |
78 | 78 | ||
@@ -120,9 +120,7 @@ void __init config_BSP(char *commandp, int size) | |||
120 | mach_sched_init = hw_timer_init; | 120 | mach_sched_init = hw_timer_init; |
121 | m527x_uarts_init(); | 121 | m527x_uarts_init(); |
122 | m527x_fec_init(); | 122 | m527x_fec_init(); |
123 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
124 | m527x_qspi_init(); | 123 | m527x_qspi_init(); |
125 | #endif | ||
126 | } | 124 | } |
127 | 125 | ||
128 | /***************************************************************************/ | 126 | /***************************************************************************/ |
diff --git a/arch/m68k/platform/coldfire/m528x.c b/arch/m68k/platform/coldfire/m528x.c index b03a9d271837..21cd161d36f1 100644 --- a/arch/m68k/platform/coldfire/m528x.c +++ b/arch/m68k/platform/coldfire/m528x.c | |||
@@ -34,6 +34,7 @@ DEFINE_CLK(mcfpit3, "mcfpit.3", MCF_CLK); | |||
34 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); | 34 | DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK); |
35 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); | 35 | DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK); |
36 | DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); | 36 | DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK); |
37 | DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK); | ||
37 | DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); | 38 | DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK); |
38 | 39 | ||
39 | struct clk *mcf_clks[] = { | 40 | struct clk *mcf_clks[] = { |
@@ -46,21 +47,20 @@ struct clk *mcf_clks[] = { | |||
46 | &clk_mcfuart0, | 47 | &clk_mcfuart0, |
47 | &clk_mcfuart1, | 48 | &clk_mcfuart1, |
48 | &clk_mcfuart2, | 49 | &clk_mcfuart2, |
50 | &clk_mcfqspi0, | ||
49 | &clk_fec0, | 51 | &clk_fec0, |
50 | NULL | 52 | NULL |
51 | }; | 53 | }; |
52 | 54 | ||
53 | /***************************************************************************/ | 55 | /***************************************************************************/ |
54 | 56 | ||
55 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
56 | |||
57 | static void __init m528x_qspi_init(void) | 57 | static void __init m528x_qspi_init(void) |
58 | { | 58 | { |
59 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
59 | /* setup Port QS for QSPI with gpio CS control */ | 60 | /* setup Port QS for QSPI with gpio CS control */ |
60 | __raw_writeb(0x07, MCFGPIO_PQSPAR); | 61 | __raw_writeb(0x07, MCFGPIO_PQSPAR); |
61 | } | ||
62 | |||
63 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ | 62 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
63 | } | ||
64 | 64 | ||
65 | /***************************************************************************/ | 65 | /***************************************************************************/ |
66 | 66 | ||
@@ -126,9 +126,7 @@ void __init config_BSP(char *commandp, int size) | |||
126 | mach_sched_init = hw_timer_init; | 126 | mach_sched_init = hw_timer_init; |
127 | m528x_uarts_init(); | 127 | m528x_uarts_init(); |
128 | m528x_fec_init(); | 128 | m528x_fec_init(); |
129 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
130 | m528x_qspi_init(); | 129 | m528x_qspi_init(); |
131 | #endif | ||
132 | } | 130 | } |
133 | 131 | ||
134 | /***************************************************************************/ | 132 | /***************************************************************************/ |
diff --git a/arch/m68k/platform/coldfire/m53xx.c b/arch/m68k/platform/coldfire/m53xx.c index 5286f98fbed0..80879a7fe3d5 100644 --- a/arch/m68k/platform/coldfire/m53xx.c +++ b/arch/m68k/platform/coldfire/m53xx.c | |||
@@ -166,15 +166,13 @@ static void __init m53xx_clk_init(void) | |||
166 | 166 | ||
167 | /***************************************************************************/ | 167 | /***************************************************************************/ |
168 | 168 | ||
169 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
170 | |||
171 | static void __init m53xx_qspi_init(void) | 169 | static void __init m53xx_qspi_init(void) |
172 | { | 170 | { |
171 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
173 | /* setup QSPS pins for QSPI with gpio CS control */ | 172 | /* setup QSPS pins for QSPI with gpio CS control */ |
174 | writew(0x01f0, MCFGPIO_PAR_QSPI); | 173 | writew(0x01f0, MCFGPIO_PAR_QSPI); |
175 | } | ||
176 | |||
177 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ | 174 | #endif /* IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) */ |
175 | } | ||
178 | 176 | ||
179 | /***************************************************************************/ | 177 | /***************************************************************************/ |
180 | 178 | ||
@@ -219,9 +217,7 @@ void __init config_BSP(char *commandp, int size) | |||
219 | m53xx_clk_init(); | 217 | m53xx_clk_init(); |
220 | m53xx_uarts_init(); | 218 | m53xx_uarts_init(); |
221 | m53xx_fec_init(); | 219 | m53xx_fec_init(); |
222 | #if IS_ENABLED(CONFIG_SPI_COLDFIRE_QSPI) | ||
223 | m53xx_qspi_init(); | 220 | m53xx_qspi_init(); |
224 | #endif | ||
225 | 221 | ||
226 | #ifdef CONFIG_BDM_DISABLE | 222 | #ifdef CONFIG_BDM_DISABLE |
227 | /* | 223 | /* |