diff options
Diffstat (limited to 'arch/blackfin/mach-bf548')
-rw-r--r-- | arch/blackfin/mach-bf548/Kconfig | 2 | ||||
-rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 96 | ||||
-rw-r--r-- | arch/blackfin/mach-bf548/head.S | 55 | ||||
-rw-r--r-- | arch/blackfin/mach-bf548/ints-priority.c | 4 |
4 files changed, 125 insertions, 32 deletions
diff --git a/arch/blackfin/mach-bf548/Kconfig b/arch/blackfin/mach-bf548/Kconfig index d8bd3b49f150..1bfcd8f646ab 100644 --- a/arch/blackfin/mach-bf548/Kconfig +++ b/arch/blackfin/mach-bf548/Kconfig | |||
@@ -7,7 +7,7 @@ menu "BF548 Specific Configuration" | |||
7 | config DEB_DMA_URGENT | 7 | config DEB_DMA_URGENT |
8 | bool "DMA has priority over core for ext. accesses" | 8 | bool "DMA has priority over core for ext. accesses" |
9 | depends on BF54x | 9 | depends on BF54x |
10 | default n | 10 | default y |
11 | help | 11 | help |
12 | Treat any DEB1, DEB2 and DEB3 request as Urgent | 12 | Treat any DEB1, DEB2 and DEB3 request as Urgent |
13 | 13 | ||
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index d37d6653c4bc..14860f04d1bd 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/mtd/mtd.h> | 33 | #include <linux/mtd/mtd.h> |
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/mtd/physmap.h> | ||
35 | #include <linux/spi/spi.h> | 36 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 37 | #include <linux/spi/flash.h> |
37 | #include <linux/irq.h> | 38 | #include <linux/irq.h> |
@@ -206,23 +207,6 @@ static struct platform_device smsc911x_device = { | |||
206 | }; | 207 | }; |
207 | #endif | 208 | #endif |
208 | 209 | ||
209 | #if defined(CONFIG_USB_BF54x_HCD) || defined(CONFIG_USB_BF54x_HCD_MODULE) | ||
210 | static struct resource bf54x_hcd_resources[] = { | ||
211 | { | ||
212 | .start = 0xFFC03C00, | ||
213 | .end = 0xFFC040FF, | ||
214 | .flags = IORESOURCE_MEM, | ||
215 | }, | ||
216 | }; | ||
217 | |||
218 | static struct platform_device bf54x_hcd = { | ||
219 | .name = "bf54x-hcd", | ||
220 | .id = 0, | ||
221 | .num_resources = ARRAY_SIZE(bf54x_hcd_resources), | ||
222 | .resource = bf54x_hcd_resources, | ||
223 | }; | ||
224 | #endif | ||
225 | |||
226 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | 210 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) |
227 | static struct resource musb_resources[] = { | 211 | static struct resource musb_resources[] = { |
228 | [0] = { | 212 | [0] = { |
@@ -243,14 +227,14 @@ static struct resource musb_resources[] = { | |||
243 | }; | 227 | }; |
244 | 228 | ||
245 | static struct musb_hdrc_platform_data musb_plat = { | 229 | static struct musb_hdrc_platform_data musb_plat = { |
246 | #ifdef CONFIG_USB_MUSB_OTG | 230 | #if defined(CONFIG_USB_MUSB_OTG) |
247 | .mode = MUSB_OTG, | 231 | .mode = MUSB_OTG, |
248 | #elif CONFIG_USB_MUSB_HDRC_HCD | 232 | #elif defined(CONFIG_USB_MUSB_HDRC_HCD) |
249 | .mode = MUSB_HOST, | 233 | .mode = MUSB_HOST, |
250 | #elif CONFIG_USB_GADGET_MUSB_HDRC | 234 | #elif defined(CONFIG_USB_GADGET_MUSB_HDRC) |
251 | .mode = MUSB_PERIPHERAL, | 235 | .mode = MUSB_PERIPHERAL, |
252 | #endif | 236 | #endif |
253 | .multipoint = 1, | 237 | .multipoint = 0, |
254 | }; | 238 | }; |
255 | 239 | ||
256 | static u64 musb_dmamask = ~(u32)0; | 240 | static u64 musb_dmamask = ~(u32)0; |
@@ -344,6 +328,44 @@ static struct platform_device bf54x_sdh_device = { | |||
344 | }; | 328 | }; |
345 | #endif | 329 | #endif |
346 | 330 | ||
331 | static struct mtd_partition ezkit_partitions[] = { | ||
332 | { | ||
333 | .name = "Bootloader", | ||
334 | .size = 0x20000, | ||
335 | .offset = 0, | ||
336 | }, { | ||
337 | .name = "Kernel", | ||
338 | .size = 0xE0000, | ||
339 | .offset = MTDPART_OFS_APPEND, | ||
340 | }, { | ||
341 | .name = "RootFS", | ||
342 | .size = MTDPART_SIZ_FULL, | ||
343 | .offset = MTDPART_OFS_APPEND, | ||
344 | } | ||
345 | }; | ||
346 | |||
347 | static struct physmap_flash_data ezkit_flash_data = { | ||
348 | .width = 2, | ||
349 | .parts = ezkit_partitions, | ||
350 | .nr_parts = ARRAY_SIZE(ezkit_partitions), | ||
351 | }; | ||
352 | |||
353 | static struct resource ezkit_flash_resource = { | ||
354 | .start = 0x20000000, | ||
355 | .end = 0x20ffffff, | ||
356 | .flags = IORESOURCE_MEM, | ||
357 | }; | ||
358 | |||
359 | static struct platform_device ezkit_flash_device = { | ||
360 | .name = "physmap-flash", | ||
361 | .id = 0, | ||
362 | .dev = { | ||
363 | .platform_data = &ezkit_flash_data, | ||
364 | }, | ||
365 | .num_resources = 1, | ||
366 | .resource = &ezkit_flash_resource, | ||
367 | }; | ||
368 | |||
347 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 369 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
348 | /* all SPI peripherals info goes here */ | 370 | /* all SPI peripherals info goes here */ |
349 | #if defined(CONFIG_MTD_M25P80) \ | 371 | #if defined(CONFIG_MTD_M25P80) \ |
@@ -531,6 +553,29 @@ static struct platform_device i2c_bfin_twi1_device = { | |||
531 | #endif | 553 | #endif |
532 | #endif | 554 | #endif |
533 | 555 | ||
556 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
557 | #include <linux/gpio_keys.h> | ||
558 | |||
559 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | ||
560 | {BTN_0, GPIO_PB8, 1, "gpio-keys: BTN0"}, | ||
561 | {BTN_1, GPIO_PB9, 1, "gpio-keys: BTN1"}, | ||
562 | {BTN_2, GPIO_PB10, 1, "gpio-keys: BTN2"}, | ||
563 | {BTN_3, GPIO_PB11, 1, "gpio-keys: BTN3"}, | ||
564 | }; | ||
565 | |||
566 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { | ||
567 | .buttons = bfin_gpio_keys_table, | ||
568 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), | ||
569 | }; | ||
570 | |||
571 | static struct platform_device bfin_device_gpiokeys = { | ||
572 | .name = "gpio-keys", | ||
573 | .dev = { | ||
574 | .platform_data = &bfin_gpio_keys_data, | ||
575 | }, | ||
576 | }; | ||
577 | #endif | ||
578 | |||
534 | static struct platform_device *ezkit_devices[] __initdata = { | 579 | static struct platform_device *ezkit_devices[] __initdata = { |
535 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 580 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
536 | &rtc_device, | 581 | &rtc_device, |
@@ -548,10 +593,6 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
548 | &smsc911x_device, | 593 | &smsc911x_device, |
549 | #endif | 594 | #endif |
550 | 595 | ||
551 | #if defined(CONFIG_USB_BF54x_HCD) || defined(CONFIG_USB_BF54x_HCD_MODULE) | ||
552 | &bf54x_hcd, | ||
553 | #endif | ||
554 | |||
555 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) | 596 | #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE) |
556 | &musb_device, | 597 | &musb_device, |
557 | #endif | 598 | #endif |
@@ -583,6 +624,11 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
583 | &i2c_bfin_twi1_device, | 624 | &i2c_bfin_twi1_device, |
584 | #endif | 625 | #endif |
585 | #endif | 626 | #endif |
627 | |||
628 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
629 | &bfin_device_gpiokeys, | ||
630 | #endif | ||
631 | &ezkit_flash_device, | ||
586 | }; | 632 | }; |
587 | 633 | ||
588 | static int __init stamp_init(void) | 634 | static int __init stamp_init(void) |
diff --git a/arch/blackfin/mach-bf548/head.S b/arch/blackfin/mach-bf548/head.S index 74b34c7f3629..74fe258421a5 100644 --- a/arch/blackfin/mach-bf548/head.S +++ b/arch/blackfin/mach-bf548/head.S | |||
@@ -298,8 +298,8 @@ ENTRY(_start_dma_code) | |||
298 | w[p0] = r0.l; | 298 | w[p0] = r0.l; |
299 | ssync; | 299 | ssync; |
300 | 300 | ||
301 | p0.h = hi(SIC_IWR); | 301 | p0.h = hi(SIC_IWR0); |
302 | p0.l = lo(SIC_IWR); | 302 | p0.l = lo(SIC_IWR0); |
303 | r0.l = 0x1; | 303 | r0.l = 0x1; |
304 | r0.h = 0x0; | 304 | r0.h = 0x0; |
305 | [p0] = r0; | 305 | [p0] = r0; |
@@ -324,12 +324,25 @@ ENTRY(_start_dma_code) | |||
324 | w[p0] = r0.l; | 324 | w[p0] = r0.l; |
325 | ssync; | 325 | ssync; |
326 | 326 | ||
327 | #if defined(CONFIG_BF54x) | ||
328 | P2.H = hi(EBIU_RSTCTL); | ||
329 | P2.L = lo(EBIU_RSTCTL); | ||
330 | R0 = [P2]; | ||
331 | BITSET (R0, 3); | ||
332 | #else | ||
327 | P2.H = hi(EBIU_SDGCTL); | 333 | P2.H = hi(EBIU_SDGCTL); |
328 | P2.L = lo(EBIU_SDGCTL); | 334 | P2.L = lo(EBIU_SDGCTL); |
329 | R0 = [P2]; | 335 | R0 = [P2]; |
330 | BITSET (R0, 24); | 336 | BITSET (R0, 24); |
337 | #endif | ||
331 | [P2] = R0; | 338 | [P2] = R0; |
332 | SSYNC; | 339 | SSYNC; |
340 | #if defined(CONFIG_BF54x) | ||
341 | .LSRR_MODE: | ||
342 | R0 = [P2]; | ||
343 | CC = BITTST(R0, 4); | ||
344 | if !CC JUMP .LSRR_MODE; | ||
345 | #endif | ||
333 | 346 | ||
334 | r0 = CONFIG_VCO_MULT & 63; /* Load the VCO multiplier */ | 347 | r0 = CONFIG_VCO_MULT & 63; /* Load the VCO multiplier */ |
335 | r0 = r0 << 9; /* Shift it over, */ | 348 | r0 = r0 << 9; /* Shift it over, */ |
@@ -361,6 +374,39 @@ ENTRY(_start_dma_code) | |||
361 | w[p0] = r0.l; | 374 | w[p0] = r0.l; |
362 | ssync; | 375 | ssync; |
363 | 376 | ||
377 | #if defined(CONFIG_BF54x) | ||
378 | P2.H = hi(EBIU_RSTCTL); | ||
379 | P2.L = lo(EBIU_RSTCTL); | ||
380 | R0 = [P2]; | ||
381 | CC = BITTST(R0, 0); | ||
382 | if CC jump .Lskipddrrst; | ||
383 | BITSET (R0, 0); | ||
384 | .Lskipddrrst: | ||
385 | BITCLR (R0, 3); | ||
386 | [P2] = R0; | ||
387 | SSYNC; | ||
388 | |||
389 | p0.l = lo(EBIU_DDRCTL0); | ||
390 | p0.h = hi(EBIU_DDRCTL0); | ||
391 | r0.l = lo(mem_DDRCTL0); | ||
392 | r0.h = hi(mem_DDRCTL0); | ||
393 | [p0] = r0; | ||
394 | ssync; | ||
395 | |||
396 | p0.l = lo(EBIU_DDRCTL1); | ||
397 | p0.h = hi(EBIU_DDRCTL1); | ||
398 | r0.l = lo(mem_DDRCTL1); | ||
399 | r0.h = hi(mem_DDRCTL1); | ||
400 | [p0] = r0; | ||
401 | ssync; | ||
402 | |||
403 | p0.l = lo(EBIU_DDRCTL2); | ||
404 | p0.h = hi(EBIU_DDRCTL2); | ||
405 | r0.l = lo(mem_DDRCTL2); | ||
406 | r0.h = hi(mem_DDRCTL2); | ||
407 | [p0] = r0; | ||
408 | ssync; | ||
409 | #else | ||
364 | p0.l = lo(EBIU_SDRRC); | 410 | p0.l = lo(EBIU_SDRRC); |
365 | p0.h = hi(EBIU_SDRRC); | 411 | p0.h = hi(EBIU_SDRRC); |
366 | r0 = mem_SDRRC; | 412 | r0 = mem_SDRRC; |
@@ -394,9 +440,10 @@ ENTRY(_start_dma_code) | |||
394 | R1 = R1 | R0; | 440 | R1 = R1 | R0; |
395 | [P2] = R1; | 441 | [P2] = R1; |
396 | SSYNC; | 442 | SSYNC; |
443 | #endif | ||
397 | 444 | ||
398 | p0.h = hi(SIC_IWR); | 445 | p0.h = hi(SIC_IWR0); |
399 | p0.l = lo(SIC_IWR); | 446 | p0.l = lo(SIC_IWR0); |
400 | r0.l = lo(IWR_ENABLE_ALL); | 447 | r0.l = lo(IWR_ENABLE_ALL); |
401 | r0.h = hi(IWR_ENABLE_ALL); | 448 | r0.h = hi(IWR_ENABLE_ALL); |
402 | [p0] = r0; | 449 | [p0] = r0; |
diff --git a/arch/blackfin/mach-bf548/ints-priority.c b/arch/blackfin/mach-bf548/ints-priority.c index cb0ebac53c79..2665653cee37 100644 --- a/arch/blackfin/mach-bf548/ints-priority.c +++ b/arch/blackfin/mach-bf548/ints-priority.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Author: Michael Hennerich | 4 | * Author: Michael Hennerich |
5 | * | 5 | * |
6 | * Created: | 6 | * Created: |
7 | * Description: Set up the interupt priorities | 7 | * Description: Set up the interrupt priorities |
8 | * | 8 | * |
9 | * Modified: | 9 | * Modified: |
10 | * Copyright 2004-2006 Analog Devices Inc. | 10 | * Copyright 2004-2006 Analog Devices Inc. |
@@ -58,7 +58,7 @@ void program_IAR(void) | |||
58 | ((CONFIG_IRQ_PINT1 - 7) << IRQ_PINT1_POS) | | 58 | ((CONFIG_IRQ_PINT1 - 7) << IRQ_PINT1_POS) | |
59 | ((CONFIG_IRQ_MDMAS0 - 7) << IRQ_MDMAS0_POS) | | 59 | ((CONFIG_IRQ_MDMAS0 - 7) << IRQ_MDMAS0_POS) | |
60 | ((CONFIG_IRQ_MDMAS1 - 7) << IRQ_MDMAS1_POS) | | 60 | ((CONFIG_IRQ_MDMAS1 - 7) << IRQ_MDMAS1_POS) | |
61 | ((CONFIG_IRQ_WATCHDOG - 7) << IRQ_WATCHDOG_POS)); | 61 | ((CONFIG_IRQ_WATCHDOG - 7) << IRQ_WATCH_POS)); |
62 | 62 | ||
63 | bfin_write_SIC_IAR3(((CONFIG_IRQ_DMAC1_ERR - 7) << IRQ_DMAC1_ERR_POS) | | 63 | bfin_write_SIC_IAR3(((CONFIG_IRQ_DMAC1_ERR - 7) << IRQ_DMAC1_ERR_POS) | |
64 | ((CONFIG_IRQ_SPORT2_ERR - 7) << IRQ_SPORT2_ERR_POS) | | 64 | ((CONFIG_IRQ_SPORT2_ERR - 7) << IRQ_SPORT2_ERR_POS) | |