diff options
Diffstat (limited to 'arch')
177 files changed, 16532 insertions, 821 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 4bb7730a2682..daaa4b2b46e1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -21,6 +21,7 @@ config ARM | |||
21 | select HAVE_GENERIC_DMA_COHERENT | 21 | select HAVE_GENERIC_DMA_COHERENT |
22 | select HAVE_KERNEL_GZIP | 22 | select HAVE_KERNEL_GZIP |
23 | select HAVE_KERNEL_LZO | 23 | select HAVE_KERNEL_LZO |
24 | select HAVE_KERNEL_LZMA | ||
24 | select HAVE_PERF_EVENTS | 25 | select HAVE_PERF_EVENTS |
25 | select PERF_USE_VMALLOC | 26 | select PERF_USE_VMALLOC |
26 | help | 27 | help |
@@ -42,6 +43,11 @@ config GENERIC_GPIO | |||
42 | 43 | ||
43 | config GENERIC_TIME | 44 | config GENERIC_TIME |
44 | bool | 45 | bool |
46 | default y | ||
47 | |||
48 | config ARCH_USES_GETTIMEOFFSET | ||
49 | bool | ||
50 | default n | ||
45 | 51 | ||
46 | config GENERIC_CLOCKEVENTS | 52 | config GENERIC_CLOCKEVENTS |
47 | bool | 53 | bool |
@@ -231,6 +237,7 @@ config ARCH_AAEC2000 | |||
231 | select CPU_ARM920T | 237 | select CPU_ARM920T |
232 | select ARM_AMBA | 238 | select ARM_AMBA |
233 | select HAVE_CLK | 239 | select HAVE_CLK |
240 | select ARCH_USES_GETTIMEOFFSET | ||
234 | help | 241 | help |
235 | This enables support for systems based on the Agilent AAEC-2000 | 242 | This enables support for systems based on the Agilent AAEC-2000 |
236 | 243 | ||
@@ -238,7 +245,6 @@ config ARCH_INTEGRATOR | |||
238 | bool "ARM Ltd. Integrator family" | 245 | bool "ARM Ltd. Integrator family" |
239 | select ARM_AMBA | 246 | select ARM_AMBA |
240 | select ARCH_HAS_CPUFREQ | 247 | select ARCH_HAS_CPUFREQ |
241 | select HAVE_CLK | ||
242 | select COMMON_CLKDEV | 248 | select COMMON_CLKDEV |
243 | select ICST | 249 | select ICST |
244 | select GENERIC_TIME | 250 | select GENERIC_TIME |
@@ -250,7 +256,6 @@ config ARCH_INTEGRATOR | |||
250 | config ARCH_REALVIEW | 256 | config ARCH_REALVIEW |
251 | bool "ARM Ltd. RealView family" | 257 | bool "ARM Ltd. RealView family" |
252 | select ARM_AMBA | 258 | select ARM_AMBA |
253 | select HAVE_CLK | ||
254 | select COMMON_CLKDEV | 259 | select COMMON_CLKDEV |
255 | select ICST | 260 | select ICST |
256 | select GENERIC_TIME | 261 | select GENERIC_TIME |
@@ -265,7 +270,6 @@ config ARCH_VERSATILE | |||
265 | bool "ARM Ltd. Versatile family" | 270 | bool "ARM Ltd. Versatile family" |
266 | select ARM_AMBA | 271 | select ARM_AMBA |
267 | select ARM_VIC | 272 | select ARM_VIC |
268 | select HAVE_CLK | ||
269 | select COMMON_CLKDEV | 273 | select COMMON_CLKDEV |
270 | select ICST | 274 | select ICST |
271 | select GENERIC_TIME | 275 | select GENERIC_TIME |
@@ -295,6 +299,7 @@ config ARCH_AT91 | |||
295 | select GENERIC_GPIO | 299 | select GENERIC_GPIO |
296 | select ARCH_REQUIRE_GPIOLIB | 300 | select ARCH_REQUIRE_GPIOLIB |
297 | select HAVE_CLK | 301 | select HAVE_CLK |
302 | select ARCH_USES_GETTIMEOFFSET | ||
298 | help | 303 | help |
299 | This enables support for systems based on the Atmel AT91RM9200, | 304 | This enables support for systems based on the Atmel AT91RM9200, |
300 | AT91SAM9 and AT91CAP9 processors. | 305 | AT91SAM9 and AT91CAP9 processors. |
@@ -314,6 +319,7 @@ config ARCH_BCMRING | |||
314 | config ARCH_CLPS711X | 319 | config ARCH_CLPS711X |
315 | bool "Cirrus Logic CLPS711x/EP721x-based" | 320 | bool "Cirrus Logic CLPS711x/EP721x-based" |
316 | select CPU_ARM720T | 321 | select CPU_ARM720T |
322 | select ARCH_USES_GETTIMEOFFSET | ||
317 | help | 323 | help |
318 | Support for Cirrus Logic 711x/721x based boards. | 324 | Support for Cirrus Logic 711x/721x based boards. |
319 | 325 | ||
@@ -322,6 +328,7 @@ config ARCH_GEMINI | |||
322 | select CPU_FA526 | 328 | select CPU_FA526 |
323 | select GENERIC_GPIO | 329 | select GENERIC_GPIO |
324 | select ARCH_REQUIRE_GPIOLIB | 330 | select ARCH_REQUIRE_GPIOLIB |
331 | select ARCH_USES_GETTIMEOFFSET | ||
325 | help | 332 | help |
326 | Support for the Cortina Systems Gemini family SoCs | 333 | Support for the Cortina Systems Gemini family SoCs |
327 | 334 | ||
@@ -330,6 +337,7 @@ config ARCH_EBSA110 | |||
330 | select CPU_SA110 | 337 | select CPU_SA110 |
331 | select ISA | 338 | select ISA |
332 | select NO_IOPORT | 339 | select NO_IOPORT |
340 | select ARCH_USES_GETTIMEOFFSET | ||
333 | help | 341 | help |
334 | This is an evaluation board for the StrongARM processor available | 342 | This is an evaluation board for the StrongARM processor available |
335 | from Digital. It has limited hardware on-board, including an | 343 | from Digital. It has limited hardware on-board, including an |
@@ -342,10 +350,10 @@ config ARCH_EP93XX | |||
342 | select ARM_AMBA | 350 | select ARM_AMBA |
343 | select ARM_VIC | 351 | select ARM_VIC |
344 | select GENERIC_GPIO | 352 | select GENERIC_GPIO |
345 | select HAVE_CLK | ||
346 | select COMMON_CLKDEV | 353 | select COMMON_CLKDEV |
347 | select ARCH_REQUIRE_GPIOLIB | 354 | select ARCH_REQUIRE_GPIOLIB |
348 | select ARCH_HAS_HOLES_MEMORYMODEL | 355 | select ARCH_HAS_HOLES_MEMORYMODEL |
356 | select ARCH_USES_GETTIMEOFFSET | ||
349 | help | 357 | help |
350 | This enables support for the Cirrus EP93xx series of CPUs. | 358 | This enables support for the Cirrus EP93xx series of CPUs. |
351 | 359 | ||
@@ -353,6 +361,7 @@ config ARCH_FOOTBRIDGE | |||
353 | bool "FootBridge" | 361 | bool "FootBridge" |
354 | select CPU_SA110 | 362 | select CPU_SA110 |
355 | select FOOTBRIDGE | 363 | select FOOTBRIDGE |
364 | select ARCH_USES_GETTIMEOFFSET | ||
356 | help | 365 | help |
357 | Support for systems based on the DC21285 companion chip | 366 | Support for systems based on the DC21285 companion chip |
358 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. | 367 | ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. |
@@ -362,7 +371,6 @@ config ARCH_MXC | |||
362 | select GENERIC_TIME | 371 | select GENERIC_TIME |
363 | select GENERIC_CLOCKEVENTS | 372 | select GENERIC_CLOCKEVENTS |
364 | select ARCH_REQUIRE_GPIOLIB | 373 | select ARCH_REQUIRE_GPIOLIB |
365 | select HAVE_CLK | ||
366 | select COMMON_CLKDEV | 374 | select COMMON_CLKDEV |
367 | help | 375 | help |
368 | Support for Freescale MXC/iMX-based family of processors | 376 | Support for Freescale MXC/iMX-based family of processors |
@@ -370,7 +378,6 @@ config ARCH_MXC | |||
370 | config ARCH_STMP3XXX | 378 | config ARCH_STMP3XXX |
371 | bool "Freescale STMP3xxx" | 379 | bool "Freescale STMP3xxx" |
372 | select CPU_ARM926T | 380 | select CPU_ARM926T |
373 | select HAVE_CLK | ||
374 | select COMMON_CLKDEV | 381 | select COMMON_CLKDEV |
375 | select ARCH_REQUIRE_GPIOLIB | 382 | select ARCH_REQUIRE_GPIOLIB |
376 | select GENERIC_TIME | 383 | select GENERIC_TIME |
@@ -393,6 +400,7 @@ config ARCH_H720X | |||
393 | bool "Hynix HMS720x-based" | 400 | bool "Hynix HMS720x-based" |
394 | select CPU_ARM720T | 401 | select CPU_ARM720T |
395 | select ISA_DMA_API | 402 | select ISA_DMA_API |
403 | select ARCH_USES_GETTIMEOFFSET | ||
396 | help | 404 | help |
397 | This enables support for systems based on the Hynix HMS720x | 405 | This enables support for systems based on the Hynix HMS720x |
398 | 406 | ||
@@ -435,6 +443,7 @@ config ARCH_IXP23XX | |||
435 | depends on MMU | 443 | depends on MMU |
436 | select CPU_XSC3 | 444 | select CPU_XSC3 |
437 | select PCI | 445 | select PCI |
446 | select ARCH_USES_GETTIMEOFFSET | ||
438 | help | 447 | help |
439 | Support for Intel's IXP23xx (XScale) family of processors. | 448 | Support for Intel's IXP23xx (XScale) family of processors. |
440 | 449 | ||
@@ -443,6 +452,7 @@ config ARCH_IXP2000 | |||
443 | depends on MMU | 452 | depends on MMU |
444 | select CPU_XSCALE | 453 | select CPU_XSCALE |
445 | select PCI | 454 | select PCI |
455 | select ARCH_USES_GETTIMEOFFSET | ||
446 | help | 456 | help |
447 | Support for Intel's IXP2400/2800 (XScale) family of processors. | 457 | Support for Intel's IXP2400/2800 (XScale) family of processors. |
448 | 458 | ||
@@ -461,6 +471,7 @@ config ARCH_L7200 | |||
461 | bool "LinkUp-L7200" | 471 | bool "LinkUp-L7200" |
462 | select CPU_ARM720T | 472 | select CPU_ARM720T |
463 | select FIQ | 473 | select FIQ |
474 | select ARCH_USES_GETTIMEOFFSET | ||
464 | help | 475 | help |
465 | Say Y here if you intend to run this kernel on a LinkUp Systems | 476 | Say Y here if you intend to run this kernel on a LinkUp Systems |
466 | L7200 Software Development Board which uses an ARM720T processor. | 477 | L7200 Software Development Board which uses an ARM720T processor. |
@@ -537,7 +548,6 @@ config ARCH_MMP | |||
537 | depends on MMU | 548 | depends on MMU |
538 | select GENERIC_GPIO | 549 | select GENERIC_GPIO |
539 | select ARCH_REQUIRE_GPIOLIB | 550 | select ARCH_REQUIRE_GPIOLIB |
540 | select HAVE_CLK | ||
541 | select COMMON_CLKDEV | 551 | select COMMON_CLKDEV |
542 | select GENERIC_TIME | 552 | select GENERIC_TIME |
543 | select GENERIC_CLOCKEVENTS | 553 | select GENERIC_CLOCKEVENTS |
@@ -551,6 +561,7 @@ config ARCH_KS8695 | |||
551 | select CPU_ARM922T | 561 | select CPU_ARM922T |
552 | select GENERIC_GPIO | 562 | select GENERIC_GPIO |
553 | select ARCH_REQUIRE_GPIOLIB | 563 | select ARCH_REQUIRE_GPIOLIB |
564 | select ARCH_USES_GETTIMEOFFSET | ||
554 | help | 565 | help |
555 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based | 566 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based |
556 | System-on-Chip devices. | 567 | System-on-Chip devices. |
@@ -573,7 +584,6 @@ config ARCH_W90X900 | |||
573 | select CPU_ARM926T | 584 | select CPU_ARM926T |
574 | select ARCH_REQUIRE_GPIOLIB | 585 | select ARCH_REQUIRE_GPIOLIB |
575 | select GENERIC_GPIO | 586 | select GENERIC_GPIO |
576 | select HAVE_CLK | ||
577 | select COMMON_CLKDEV | 587 | select COMMON_CLKDEV |
578 | select GENERIC_TIME | 588 | select GENERIC_TIME |
579 | select GENERIC_CLOCKEVENTS | 589 | select GENERIC_CLOCKEVENTS |
@@ -589,7 +599,6 @@ config ARCH_W90X900 | |||
589 | config ARCH_NUC93X | 599 | config ARCH_NUC93X |
590 | bool "Nuvoton NUC93X CPU" | 600 | bool "Nuvoton NUC93X CPU" |
591 | select CPU_ARM926T | 601 | select CPU_ARM926T |
592 | select HAVE_CLK | ||
593 | select COMMON_CLKDEV | 602 | select COMMON_CLKDEV |
594 | help | 603 | help |
595 | Support for Nuvoton (Winbond logic dept.) NUC93X MCU,The NUC93X is a | 604 | Support for Nuvoton (Winbond logic dept.) NUC93X MCU,The NUC93X is a |
@@ -598,8 +607,8 @@ config ARCH_NUC93X | |||
598 | config ARCH_PNX4008 | 607 | config ARCH_PNX4008 |
599 | bool "Philips Nexperia PNX4008 Mobile" | 608 | bool "Philips Nexperia PNX4008 Mobile" |
600 | select CPU_ARM926T | 609 | select CPU_ARM926T |
601 | select HAVE_CLK | ||
602 | select COMMON_CLKDEV | 610 | select COMMON_CLKDEV |
611 | select ARCH_USES_GETTIMEOFFSET | ||
603 | help | 612 | help |
604 | This enables support for Philips PNX4008 mobile platform. | 613 | This enables support for Philips PNX4008 mobile platform. |
605 | 614 | ||
@@ -609,7 +618,6 @@ config ARCH_PXA | |||
609 | select ARCH_MTD_XIP | 618 | select ARCH_MTD_XIP |
610 | select ARCH_HAS_CPUFREQ | 619 | select ARCH_HAS_CPUFREQ |
611 | select GENERIC_GPIO | 620 | select GENERIC_GPIO |
612 | select HAVE_CLK | ||
613 | select COMMON_CLKDEV | 621 | select COMMON_CLKDEV |
614 | select ARCH_REQUIRE_GPIOLIB | 622 | select ARCH_REQUIRE_GPIOLIB |
615 | select GENERIC_TIME | 623 | select GENERIC_TIME |
@@ -645,6 +653,7 @@ config ARCH_RPC | |||
645 | select ISA_DMA_API | 653 | select ISA_DMA_API |
646 | select NO_IOPORT | 654 | select NO_IOPORT |
647 | select ARCH_SPARSEMEM_ENABLE | 655 | select ARCH_SPARSEMEM_ENABLE |
656 | select ARCH_USES_GETTIMEOFFSET | ||
648 | help | 657 | help |
649 | On the Acorn Risc-PC, Linux can support the internal IDE disk and | 658 | On the Acorn Risc-PC, Linux can support the internal IDE disk and |
650 | CD-ROM interface, serial and parallel port, and the floppy drive. | 659 | CD-ROM interface, serial and parallel port, and the floppy drive. |
@@ -671,6 +680,7 @@ config ARCH_S3C2410 | |||
671 | select GENERIC_GPIO | 680 | select GENERIC_GPIO |
672 | select ARCH_HAS_CPUFREQ | 681 | select ARCH_HAS_CPUFREQ |
673 | select HAVE_CLK | 682 | select HAVE_CLK |
683 | select ARCH_USES_GETTIMEOFFSET | ||
674 | help | 684 | help |
675 | Samsung S3C2410X CPU based systems, such as the Simtec Electronics | 685 | Samsung S3C2410X CPU based systems, such as the Simtec Electronics |
676 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or | 686 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or |
@@ -684,6 +694,7 @@ config ARCH_S3C64XX | |||
684 | select ARM_VIC | 694 | select ARM_VIC |
685 | select HAVE_CLK | 695 | select HAVE_CLK |
686 | select NO_IOPORT | 696 | select NO_IOPORT |
697 | select ARCH_USES_GETTIMEOFFSET | ||
687 | select ARCH_HAS_CPUFREQ | 698 | select ARCH_HAS_CPUFREQ |
688 | select ARCH_REQUIRE_GPIOLIB | 699 | select ARCH_REQUIRE_GPIOLIB |
689 | select SAMSUNG_CLKSRC | 700 | select SAMSUNG_CLKSRC |
@@ -740,6 +751,7 @@ config ARCH_SHARK | |||
740 | select ISA_DMA | 751 | select ISA_DMA |
741 | select ZONE_DMA | 752 | select ZONE_DMA |
742 | select PCI | 753 | select PCI |
754 | select ARCH_USES_GETTIMEOFFSET | ||
743 | help | 755 | help |
744 | Support for the StrongARM based Digital DNARD machine, also known | 756 | Support for the StrongARM based Digital DNARD machine, also known |
745 | as "Shark" (<http://www.shark-linux.de/shark.html>). | 757 | as "Shark" (<http://www.shark-linux.de/shark.html>). |
@@ -749,6 +761,7 @@ config ARCH_LH7A40X | |||
749 | select CPU_ARM922T | 761 | select CPU_ARM922T |
750 | select ARCH_DISCONTIGMEM_ENABLE if !LH7A40X_CONTIGMEM | 762 | select ARCH_DISCONTIGMEM_ENABLE if !LH7A40X_CONTIGMEM |
751 | select ARCH_SPARSEMEM_ENABLE if !LH7A40X_CONTIGMEM | 763 | select ARCH_SPARSEMEM_ENABLE if !LH7A40X_CONTIGMEM |
764 | select ARCH_USES_GETTIMEOFFSET | ||
752 | help | 765 | help |
753 | Say Y here for systems based on one of the Sharp LH7A40X | 766 | Say Y here for systems based on one of the Sharp LH7A40X |
754 | System on a Chip processors. These CPUs include an ARM922T | 767 | System on a Chip processors. These CPUs include an ARM922T |
@@ -764,7 +777,6 @@ config ARCH_U300 | |||
764 | select ARM_VIC | 777 | select ARM_VIC |
765 | select GENERIC_TIME | 778 | select GENERIC_TIME |
766 | select GENERIC_CLOCKEVENTS | 779 | select GENERIC_CLOCKEVENTS |
767 | select HAVE_CLK | ||
768 | select COMMON_CLKDEV | 780 | select COMMON_CLKDEV |
769 | select GENERIC_GPIO | 781 | select GENERIC_GPIO |
770 | help | 782 | help |
@@ -777,6 +789,7 @@ config ARCH_U8500 | |||
777 | select GENERIC_TIME | 789 | select GENERIC_TIME |
778 | select GENERIC_CLOCKEVENTS | 790 | select GENERIC_CLOCKEVENTS |
779 | select COMMON_CLKDEV | 791 | select COMMON_CLKDEV |
792 | select ARCH_REQUIRE_GPIOLIB | ||
780 | help | 793 | help |
781 | Support for ST-Ericsson's Ux500 architecture | 794 | Support for ST-Ericsson's Ux500 architecture |
782 | 795 | ||
@@ -785,7 +798,6 @@ config ARCH_NOMADIK | |||
785 | select ARM_AMBA | 798 | select ARM_AMBA |
786 | select ARM_VIC | 799 | select ARM_VIC |
787 | select CPU_ARM926T | 800 | select CPU_ARM926T |
788 | select HAVE_CLK | ||
789 | select COMMON_CLKDEV | 801 | select COMMON_CLKDEV |
790 | select GENERIC_TIME | 802 | select GENERIC_TIME |
791 | select GENERIC_CLOCKEVENTS | 803 | select GENERIC_CLOCKEVENTS |
@@ -801,7 +813,6 @@ config ARCH_DAVINCI | |||
801 | select GENERIC_CLOCKEVENTS | 813 | select GENERIC_CLOCKEVENTS |
802 | select GENERIC_GPIO | 814 | select GENERIC_GPIO |
803 | select ARCH_REQUIRE_GPIOLIB | 815 | select ARCH_REQUIRE_GPIOLIB |
804 | select HAVE_CLK | ||
805 | select ZONE_DMA | 816 | select ZONE_DMA |
806 | select HAVE_IDE | 817 | select HAVE_IDE |
807 | select COMMON_CLKDEV | 818 | select COMMON_CLKDEV |
@@ -822,6 +833,18 @@ config ARCH_OMAP | |||
822 | help | 833 | help |
823 | Support for TI's OMAP platform (OMAP1 and OMAP2). | 834 | Support for TI's OMAP platform (OMAP1 and OMAP2). |
824 | 835 | ||
836 | config PLAT_SPEAR | ||
837 | bool "ST SPEAr" | ||
838 | select ARM_AMBA | ||
839 | select ARCH_REQUIRE_GPIOLIB | ||
840 | select COMMON_CLKDEV | ||
841 | select GENERIC_CLOCKEVENTS | ||
842 | select GENERIC_GPIO | ||
843 | select GENERIC_TIME | ||
844 | select HAVE_CLK | ||
845 | help | ||
846 | Support for ST's SPEAr platform (SPEAr3xx, SPEAr6xx and SPEAr13xx). | ||
847 | |||
825 | endchoice | 848 | endchoice |
826 | 849 | ||
827 | # | 850 | # |
@@ -907,6 +930,7 @@ source "arch/arm/plat-samsung/Kconfig" | |||
907 | source "arch/arm/plat-s3c24xx/Kconfig" | 930 | source "arch/arm/plat-s3c24xx/Kconfig" |
908 | source "arch/arm/plat-s5p/Kconfig" | 931 | source "arch/arm/plat-s5p/Kconfig" |
909 | source "arch/arm/plat-s5pc1xx/Kconfig" | 932 | source "arch/arm/plat-s5pc1xx/Kconfig" |
933 | source "arch/arm/plat-spear/Kconfig" | ||
910 | 934 | ||
911 | if ARCH_S3C2410 | 935 | if ARCH_S3C2410 |
912 | source "arch/arm/mach-s3c2400/Kconfig" | 936 | source "arch/arm/mach-s3c2400/Kconfig" |
@@ -1093,6 +1117,10 @@ config PCI | |||
1093 | your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or | 1117 | your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or |
1094 | VESA. If you have PCI, say Y, otherwise N. | 1118 | VESA. If you have PCI, say Y, otherwise N. |
1095 | 1119 | ||
1120 | config PCI_DOMAINS | ||
1121 | bool | ||
1122 | depends on PCI | ||
1123 | |||
1096 | config PCI_SYSCALL | 1124 | config PCI_SYSCALL |
1097 | def_bool PCI | 1125 | def_bool PCI |
1098 | 1126 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 67c92efa3112..219cb4ee7e32 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -179,6 +179,10 @@ machine-$(CONFIG_ARCH_VEXPRESS) := vexpress | |||
179 | machine-$(CONFIG_ARCH_W90X900) := w90x900 | 179 | machine-$(CONFIG_ARCH_W90X900) := w90x900 |
180 | machine-$(CONFIG_ARCH_NUC93X) := nuc93x | 180 | machine-$(CONFIG_ARCH_NUC93X) := nuc93x |
181 | machine-$(CONFIG_FOOTBRIDGE) := footbridge | 181 | machine-$(CONFIG_FOOTBRIDGE) := footbridge |
182 | machine-$(CONFIG_MACH_SPEAR300) := spear3xx | ||
183 | machine-$(CONFIG_MACH_SPEAR310) := spear3xx | ||
184 | machine-$(CONFIG_MACH_SPEAR320) := spear3xx | ||
185 | machine-$(CONFIG_MACH_SPEAR600) := spear6xx | ||
182 | 186 | ||
183 | # Platform directory name. This list is sorted alphanumerically | 187 | # Platform directory name. This list is sorted alphanumerically |
184 | # by CONFIG_* macro name. | 188 | # by CONFIG_* macro name. |
@@ -193,6 +197,7 @@ plat-$(CONFIG_PLAT_PXA) := pxa | |||
193 | plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx samsung | 197 | plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx samsung |
194 | plat-$(CONFIG_PLAT_S5PC1XX) := s5pc1xx samsung | 198 | plat-$(CONFIG_PLAT_S5PC1XX) := s5pc1xx samsung |
195 | plat-$(CONFIG_PLAT_S5P) := s5p samsung | 199 | plat-$(CONFIG_PLAT_S5P) := s5p samsung |
200 | plat-$(CONFIG_PLAT_SPEAR) := spear | ||
196 | plat-$(CONFIG_PLAT_VERSATILE) := versatile | 201 | plat-$(CONFIG_PLAT_VERSATILE) := versatile |
197 | 202 | ||
198 | ifeq ($(CONFIG_ARCH_EBSA110),y) | 203 | ifeq ($(CONFIG_ARCH_EBSA110),y) |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 97c89e7de7d3..53faa9063a03 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -65,6 +65,7 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ | |||
65 | 65 | ||
66 | suffix_$(CONFIG_KERNEL_GZIP) = gzip | 66 | suffix_$(CONFIG_KERNEL_GZIP) = gzip |
67 | suffix_$(CONFIG_KERNEL_LZO) = lzo | 67 | suffix_$(CONFIG_KERNEL_LZO) = lzo |
68 | suffix_$(CONFIG_KERNEL_LZMA) = lzma | ||
68 | 69 | ||
69 | targets := vmlinux vmlinux.lds \ | 70 | targets := vmlinux vmlinux.lds \ |
70 | piggy.$(suffix_y) piggy.$(suffix_y).o \ | 71 | piggy.$(suffix_y) piggy.$(suffix_y).o \ |
diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c index 9c097073ce4c..4c72a97bc3e1 100644 --- a/arch/arm/boot/compressed/decompress.c +++ b/arch/arm/boot/compressed/decompress.c | |||
@@ -40,6 +40,10 @@ extern void error(char *); | |||
40 | #include "../../../../lib/decompress_unlzo.c" | 40 | #include "../../../../lib/decompress_unlzo.c" |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #ifdef CONFIG_KERNEL_LZMA | ||
44 | #include "../../../../lib/decompress_unlzma.c" | ||
45 | #endif | ||
46 | |||
43 | void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)) | 47 | void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)) |
44 | { | 48 | { |
45 | decompress(input, len, NULL, NULL, output, NULL, error); | 49 | decompress(input, len, NULL, NULL, output, NULL, error); |
diff --git a/arch/arm/boot/compressed/piggy.lzma.S b/arch/arm/boot/compressed/piggy.lzma.S new file mode 100644 index 000000000000..d7e69cffbc0a --- /dev/null +++ b/arch/arm/boot/compressed/piggy.lzma.S | |||
@@ -0,0 +1,6 @@ | |||
1 | .section .piggydata,#alloc | ||
2 | .globl input_data | ||
3 | input_data: | ||
4 | .incbin "arch/arm/boot/compressed/piggy.lzma" | ||
5 | .globl input_data_end | ||
6 | input_data_end: | ||
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig index 323d2d289523..0a34c8186924 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig | |||
@@ -15,6 +15,9 @@ config ARM_VIC_NR | |||
15 | config ICST | 15 | config ICST |
16 | bool | 16 | bool |
17 | 17 | ||
18 | config PL330 | ||
19 | bool | ||
20 | |||
18 | config SA1111 | 21 | config SA1111 |
19 | bool | 22 | bool |
20 | select DMABOUNCE if !ARCH_PXA | 23 | select DMABOUNCE if !ARCH_PXA |
@@ -37,3 +40,4 @@ config SHARP_SCOOP | |||
37 | 40 | ||
38 | config COMMON_CLKDEV | 41 | config COMMON_CLKDEV |
39 | bool | 42 | bool |
43 | select HAVE_CLK | ||
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index 5e8ad0d6c917..e6e8664a9413 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile | |||
@@ -5,6 +5,7 @@ | |||
5 | obj-$(CONFIG_ARM_GIC) += gic.o | 5 | obj-$(CONFIG_ARM_GIC) += gic.o |
6 | obj-$(CONFIG_ARM_VIC) += vic.o | 6 | obj-$(CONFIG_ARM_VIC) += vic.o |
7 | obj-$(CONFIG_ICST) += icst.o | 7 | obj-$(CONFIG_ICST) += icst.o |
8 | obj-$(CONFIG_PL330) += pl330.o | ||
8 | obj-$(CONFIG_SA1111) += sa1111.o | 9 | obj-$(CONFIG_SA1111) += sa1111.o |
9 | obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o | 10 | obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o |
10 | obj-$(CONFIG_DMABOUNCE) += dmabounce.o | 11 | obj-$(CONFIG_DMABOUNCE) += dmabounce.o |
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c index 6416d5b5020d..4f8390dd6cac 100644 --- a/arch/arm/common/clkdev.c +++ b/arch/arm/common/clkdev.c | |||
@@ -52,12 +52,13 @@ static struct clk *clk_find(const char *dev_id, const char *con_id) | |||
52 | continue; | 52 | continue; |
53 | match += 1; | 53 | match += 1; |
54 | } | 54 | } |
55 | if (match == 0) | ||
56 | continue; | ||
57 | 55 | ||
58 | if (match > best) { | 56 | if (match > best) { |
59 | clk = p->clk; | 57 | clk = p->clk; |
60 | best = match; | 58 | if (match != 3) |
59 | best = match; | ||
60 | else | ||
61 | break; | ||
61 | } | 62 | } |
62 | } | 63 | } |
63 | return clk; | 64 | return clk; |
diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c new file mode 100644 index 000000000000..5ebbab6242a7 --- /dev/null +++ b/arch/arm/common/pl330.c | |||
@@ -0,0 +1,1966 @@ | |||
1 | /* linux/arch/arm/common/pl330.c | ||
2 | * | ||
3 | * Copyright (C) 2010 Samsung Electronics Co Ltd. | ||
4 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/slab.h> | ||
24 | #include <linux/module.h> | ||
25 | #include <linux/string.h> | ||
26 | #include <linux/io.h> | ||
27 | #include <linux/delay.h> | ||
28 | #include <linux/interrupt.h> | ||
29 | #include <linux/dma-mapping.h> | ||
30 | |||
31 | #include <asm/hardware/pl330.h> | ||
32 | |||
33 | /* Register and Bit field Definitions */ | ||
34 | #define DS 0x0 | ||
35 | #define DS_ST_STOP 0x0 | ||
36 | #define DS_ST_EXEC 0x1 | ||
37 | #define DS_ST_CMISS 0x2 | ||
38 | #define DS_ST_UPDTPC 0x3 | ||
39 | #define DS_ST_WFE 0x4 | ||
40 | #define DS_ST_ATBRR 0x5 | ||
41 | #define DS_ST_QBUSY 0x6 | ||
42 | #define DS_ST_WFP 0x7 | ||
43 | #define DS_ST_KILL 0x8 | ||
44 | #define DS_ST_CMPLT 0x9 | ||
45 | #define DS_ST_FLTCMP 0xe | ||
46 | #define DS_ST_FAULT 0xf | ||
47 | |||
48 | #define DPC 0x4 | ||
49 | #define INTEN 0x20 | ||
50 | #define ES 0x24 | ||
51 | #define INTSTATUS 0x28 | ||
52 | #define INTCLR 0x2c | ||
53 | #define FSM 0x30 | ||
54 | #define FSC 0x34 | ||
55 | #define FTM 0x38 | ||
56 | |||
57 | #define _FTC 0x40 | ||
58 | #define FTC(n) (_FTC + (n)*0x4) | ||
59 | |||
60 | #define _CS 0x100 | ||
61 | #define CS(n) (_CS + (n)*0x8) | ||
62 | #define CS_CNS (1 << 21) | ||
63 | |||
64 | #define _CPC 0x104 | ||
65 | #define CPC(n) (_CPC + (n)*0x8) | ||
66 | |||
67 | #define _SA 0x400 | ||
68 | #define SA(n) (_SA + (n)*0x20) | ||
69 | |||
70 | #define _DA 0x404 | ||
71 | #define DA(n) (_DA + (n)*0x20) | ||
72 | |||
73 | #define _CC 0x408 | ||
74 | #define CC(n) (_CC + (n)*0x20) | ||
75 | |||
76 | #define CC_SRCINC (1 << 0) | ||
77 | #define CC_DSTINC (1 << 14) | ||
78 | #define CC_SRCPRI (1 << 8) | ||
79 | #define CC_DSTPRI (1 << 22) | ||
80 | #define CC_SRCNS (1 << 9) | ||
81 | #define CC_DSTNS (1 << 23) | ||
82 | #define CC_SRCIA (1 << 10) | ||
83 | #define CC_DSTIA (1 << 24) | ||
84 | #define CC_SRCBRSTLEN_SHFT 4 | ||
85 | #define CC_DSTBRSTLEN_SHFT 18 | ||
86 | #define CC_SRCBRSTSIZE_SHFT 1 | ||
87 | #define CC_DSTBRSTSIZE_SHFT 15 | ||
88 | #define CC_SRCCCTRL_SHFT 11 | ||
89 | #define CC_SRCCCTRL_MASK 0x7 | ||
90 | #define CC_DSTCCTRL_SHFT 25 | ||
91 | #define CC_DRCCCTRL_MASK 0x7 | ||
92 | #define CC_SWAP_SHFT 28 | ||
93 | |||
94 | #define _LC0 0x40c | ||
95 | #define LC0(n) (_LC0 + (n)*0x20) | ||
96 | |||
97 | #define _LC1 0x410 | ||
98 | #define LC1(n) (_LC1 + (n)*0x20) | ||
99 | |||
100 | #define DBGSTATUS 0xd00 | ||
101 | #define DBG_BUSY (1 << 0) | ||
102 | |||
103 | #define DBGCMD 0xd04 | ||
104 | #define DBGINST0 0xd08 | ||
105 | #define DBGINST1 0xd0c | ||
106 | |||
107 | #define CR0 0xe00 | ||
108 | #define CR1 0xe04 | ||
109 | #define CR2 0xe08 | ||
110 | #define CR3 0xe0c | ||
111 | #define CR4 0xe10 | ||
112 | #define CRD 0xe14 | ||
113 | |||
114 | #define PERIPH_ID 0xfe0 | ||
115 | #define PCELL_ID 0xff0 | ||
116 | |||
117 | #define CR0_PERIPH_REQ_SET (1 << 0) | ||
118 | #define CR0_BOOT_EN_SET (1 << 1) | ||
119 | #define CR0_BOOT_MAN_NS (1 << 2) | ||
120 | #define CR0_NUM_CHANS_SHIFT 4 | ||
121 | #define CR0_NUM_CHANS_MASK 0x7 | ||
122 | #define CR0_NUM_PERIPH_SHIFT 12 | ||
123 | #define CR0_NUM_PERIPH_MASK 0x1f | ||
124 | #define CR0_NUM_EVENTS_SHIFT 17 | ||
125 | #define CR0_NUM_EVENTS_MASK 0x1f | ||
126 | |||
127 | #define CR1_ICACHE_LEN_SHIFT 0 | ||
128 | #define CR1_ICACHE_LEN_MASK 0x7 | ||
129 | #define CR1_NUM_ICACHELINES_SHIFT 4 | ||
130 | #define CR1_NUM_ICACHELINES_MASK 0xf | ||
131 | |||
132 | #define CRD_DATA_WIDTH_SHIFT 0 | ||
133 | #define CRD_DATA_WIDTH_MASK 0x7 | ||
134 | #define CRD_WR_CAP_SHIFT 4 | ||
135 | #define CRD_WR_CAP_MASK 0x7 | ||
136 | #define CRD_WR_Q_DEP_SHIFT 8 | ||
137 | #define CRD_WR_Q_DEP_MASK 0xf | ||
138 | #define CRD_RD_CAP_SHIFT 12 | ||
139 | #define CRD_RD_CAP_MASK 0x7 | ||
140 | #define CRD_RD_Q_DEP_SHIFT 16 | ||
141 | #define CRD_RD_Q_DEP_MASK 0xf | ||
142 | #define CRD_DATA_BUFF_SHIFT 20 | ||
143 | #define CRD_DATA_BUFF_MASK 0x3ff | ||
144 | |||
145 | #define PART 0x330 | ||
146 | #define DESIGNER 0x41 | ||
147 | #define REVISION 0x0 | ||
148 | #define INTEG_CFG 0x0 | ||
149 | #define PERIPH_ID_VAL ((PART << 0) | (DESIGNER << 12) \ | ||
150 | | (REVISION << 20) | (INTEG_CFG << 24)) | ||
151 | |||
152 | #define PCELL_ID_VAL 0xb105f00d | ||
153 | |||
154 | #define PL330_STATE_STOPPED (1 << 0) | ||
155 | #define PL330_STATE_EXECUTING (1 << 1) | ||
156 | #define PL330_STATE_WFE (1 << 2) | ||
157 | #define PL330_STATE_FAULTING (1 << 3) | ||
158 | #define PL330_STATE_COMPLETING (1 << 4) | ||
159 | #define PL330_STATE_WFP (1 << 5) | ||
160 | #define PL330_STATE_KILLING (1 << 6) | ||
161 | #define PL330_STATE_FAULT_COMPLETING (1 << 7) | ||
162 | #define PL330_STATE_CACHEMISS (1 << 8) | ||
163 | #define PL330_STATE_UPDTPC (1 << 9) | ||
164 | #define PL330_STATE_ATBARRIER (1 << 10) | ||
165 | #define PL330_STATE_QUEUEBUSY (1 << 11) | ||
166 | #define PL330_STATE_INVALID (1 << 15) | ||
167 | |||
168 | #define PL330_STABLE_STATES (PL330_STATE_STOPPED | PL330_STATE_EXECUTING \ | ||
169 | | PL330_STATE_WFE | PL330_STATE_FAULTING) | ||
170 | |||
171 | #define CMD_DMAADDH 0x54 | ||
172 | #define CMD_DMAEND 0x00 | ||
173 | #define CMD_DMAFLUSHP 0x35 | ||
174 | #define CMD_DMAGO 0xa0 | ||
175 | #define CMD_DMALD 0x04 | ||
176 | #define CMD_DMALDP 0x25 | ||
177 | #define CMD_DMALP 0x20 | ||
178 | #define CMD_DMALPEND 0x28 | ||
179 | #define CMD_DMAKILL 0x01 | ||
180 | #define CMD_DMAMOV 0xbc | ||
181 | #define CMD_DMANOP 0x18 | ||
182 | #define CMD_DMARMB 0x12 | ||
183 | #define CMD_DMASEV 0x34 | ||
184 | #define CMD_DMAST 0x08 | ||
185 | #define CMD_DMASTP 0x29 | ||
186 | #define CMD_DMASTZ 0x0c | ||
187 | #define CMD_DMAWFE 0x36 | ||
188 | #define CMD_DMAWFP 0x30 | ||
189 | #define CMD_DMAWMB 0x13 | ||
190 | |||
191 | #define SZ_DMAADDH 3 | ||
192 | #define SZ_DMAEND 1 | ||
193 | #define SZ_DMAFLUSHP 2 | ||
194 | #define SZ_DMALD 1 | ||
195 | #define SZ_DMALDP 2 | ||
196 | #define SZ_DMALP 2 | ||
197 | #define SZ_DMALPEND 2 | ||
198 | #define SZ_DMAKILL 1 | ||
199 | #define SZ_DMAMOV 6 | ||
200 | #define SZ_DMANOP 1 | ||
201 | #define SZ_DMARMB 1 | ||
202 | #define SZ_DMASEV 2 | ||
203 | #define SZ_DMAST 1 | ||
204 | #define SZ_DMASTP 2 | ||
205 | #define SZ_DMASTZ 1 | ||
206 | #define SZ_DMAWFE 2 | ||
207 | #define SZ_DMAWFP 2 | ||
208 | #define SZ_DMAWMB 1 | ||
209 | #define SZ_DMAGO 6 | ||
210 | |||
211 | #define BRST_LEN(ccr) ((((ccr) >> CC_SRCBRSTLEN_SHFT) & 0xf) + 1) | ||
212 | #define BRST_SIZE(ccr) (1 << (((ccr) >> CC_SRCBRSTSIZE_SHFT) & 0x7)) | ||
213 | |||
214 | #define BYTE_TO_BURST(b, ccr) ((b) / BRST_SIZE(ccr) / BRST_LEN(ccr)) | ||
215 | #define BURST_TO_BYTE(c, ccr) ((c) * BRST_SIZE(ccr) * BRST_LEN(ccr)) | ||
216 | |||
217 | /* | ||
218 | * With 256 bytes, we can do more than 2.5MB and 5MB xfers per req | ||
219 | * at 1byte/burst for P<->M and M<->M respectively. | ||
220 | * For typical scenario, at 1word/burst, 10MB and 20MB xfers per req | ||
221 | * should be enough for P<->M and M<->M respectively. | ||
222 | */ | ||
223 | #define MCODE_BUFF_PER_REQ 256 | ||
224 | |||
225 | /* | ||
226 | * Mark a _pl330_req as free. | ||
227 | * We do it by writing DMAEND as the first instruction | ||
228 | * because no valid request is going to have DMAEND as | ||
229 | * its first instruction to execute. | ||
230 | */ | ||
231 | #define MARK_FREE(req) do { \ | ||
232 | _emit_END(0, (req)->mc_cpu); \ | ||
233 | (req)->mc_len = 0; \ | ||
234 | } while (0) | ||
235 | |||
236 | /* If the _pl330_req is available to the client */ | ||
237 | #define IS_FREE(req) (*((u8 *)((req)->mc_cpu)) == CMD_DMAEND) | ||
238 | |||
239 | /* Use this _only_ to wait on transient states */ | ||
240 | #define UNTIL(t, s) while (!(_state(t) & (s))) cpu_relax(); | ||
241 | |||
242 | #ifdef PL330_DEBUG_MCGEN | ||
243 | static unsigned cmd_line; | ||
244 | #define PL330_DBGCMD_DUMP(off, x...) do { \ | ||
245 | printk("%x:", cmd_line); \ | ||
246 | printk(x); \ | ||
247 | cmd_line += off; \ | ||
248 | } while (0) | ||
249 | #define PL330_DBGMC_START(addr) (cmd_line = addr) | ||
250 | #else | ||
251 | #define PL330_DBGCMD_DUMP(off, x...) do {} while (0) | ||
252 | #define PL330_DBGMC_START(addr) do {} while (0) | ||
253 | #endif | ||
254 | |||
255 | struct _xfer_spec { | ||
256 | u32 ccr; | ||
257 | struct pl330_req *r; | ||
258 | struct pl330_xfer *x; | ||
259 | }; | ||
260 | |||
261 | enum dmamov_dst { | ||
262 | SAR = 0, | ||
263 | CCR, | ||
264 | DAR, | ||
265 | }; | ||
266 | |||
267 | enum pl330_dst { | ||
268 | SRC = 0, | ||
269 | DST, | ||
270 | }; | ||
271 | |||
272 | enum pl330_cond { | ||
273 | SINGLE, | ||
274 | BURST, | ||
275 | ALWAYS, | ||
276 | }; | ||
277 | |||
278 | struct _pl330_req { | ||
279 | u32 mc_bus; | ||
280 | void *mc_cpu; | ||
281 | /* Number of bytes taken to setup MC for the req */ | ||
282 | u32 mc_len; | ||
283 | struct pl330_req *r; | ||
284 | /* Hook to attach to DMAC's list of reqs with due callback */ | ||
285 | struct list_head rqd; | ||
286 | }; | ||
287 | |||
288 | /* ToBeDone for tasklet */ | ||
289 | struct _pl330_tbd { | ||
290 | bool reset_dmac; | ||
291 | bool reset_mngr; | ||
292 | u8 reset_chan; | ||
293 | }; | ||
294 | |||
295 | /* A DMAC Thread */ | ||
296 | struct pl330_thread { | ||
297 | u8 id; | ||
298 | int ev; | ||
299 | /* If the channel is not yet acquired by any client */ | ||
300 | bool free; | ||
301 | /* Parent DMAC */ | ||
302 | struct pl330_dmac *dmac; | ||
303 | /* Only two at a time */ | ||
304 | struct _pl330_req req[2]; | ||
305 | /* Index of the last submitted request */ | ||
306 | unsigned lstenq; | ||
307 | }; | ||
308 | |||
309 | enum pl330_dmac_state { | ||
310 | UNINIT, | ||
311 | INIT, | ||
312 | DYING, | ||
313 | }; | ||
314 | |||
315 | /* A DMAC */ | ||
316 | struct pl330_dmac { | ||
317 | spinlock_t lock; | ||
318 | /* Holds list of reqs with due callbacks */ | ||
319 | struct list_head req_done; | ||
320 | /* Pointer to platform specific stuff */ | ||
321 | struct pl330_info *pinfo; | ||
322 | /* Maximum possible events/irqs */ | ||
323 | int events[32]; | ||
324 | /* BUS address of MicroCode buffer */ | ||
325 | u32 mcode_bus; | ||
326 | /* CPU address of MicroCode buffer */ | ||
327 | void *mcode_cpu; | ||
328 | /* List of all Channel threads */ | ||
329 | struct pl330_thread *channels; | ||
330 | /* Pointer to the MANAGER thread */ | ||
331 | struct pl330_thread *manager; | ||
332 | /* To handle bad news in interrupt */ | ||
333 | struct tasklet_struct tasks; | ||
334 | struct _pl330_tbd dmac_tbd; | ||
335 | /* State of DMAC operation */ | ||
336 | enum pl330_dmac_state state; | ||
337 | }; | ||
338 | |||
339 | static inline void _callback(struct pl330_req *r, enum pl330_op_err err) | ||
340 | { | ||
341 | if (r && r->xfer_cb) | ||
342 | r->xfer_cb(r->token, err); | ||
343 | } | ||
344 | |||
345 | static inline bool _queue_empty(struct pl330_thread *thrd) | ||
346 | { | ||
347 | return (IS_FREE(&thrd->req[0]) && IS_FREE(&thrd->req[1])) | ||
348 | ? true : false; | ||
349 | } | ||
350 | |||
351 | static inline bool _queue_full(struct pl330_thread *thrd) | ||
352 | { | ||
353 | return (IS_FREE(&thrd->req[0]) || IS_FREE(&thrd->req[1])) | ||
354 | ? false : true; | ||
355 | } | ||
356 | |||
357 | static inline bool is_manager(struct pl330_thread *thrd) | ||
358 | { | ||
359 | struct pl330_dmac *pl330 = thrd->dmac; | ||
360 | |||
361 | /* MANAGER is indexed at the end */ | ||
362 | if (thrd->id == pl330->pinfo->pcfg.num_chan) | ||
363 | return true; | ||
364 | else | ||
365 | return false; | ||
366 | } | ||
367 | |||
368 | /* If manager of the thread is in Non-Secure mode */ | ||
369 | static inline bool _manager_ns(struct pl330_thread *thrd) | ||
370 | { | ||
371 | struct pl330_dmac *pl330 = thrd->dmac; | ||
372 | |||
373 | return (pl330->pinfo->pcfg.mode & DMAC_MODE_NS) ? true : false; | ||
374 | } | ||
375 | |||
376 | static inline u32 get_id(struct pl330_info *pi, u32 off) | ||
377 | { | ||
378 | void __iomem *regs = pi->base; | ||
379 | u32 id = 0; | ||
380 | |||
381 | id |= (readb(regs + off + 0x0) << 0); | ||
382 | id |= (readb(regs + off + 0x4) << 8); | ||
383 | id |= (readb(regs + off + 0x8) << 16); | ||
384 | id |= (readb(regs + off + 0xc) << 24); | ||
385 | |||
386 | return id; | ||
387 | } | ||
388 | |||
389 | static inline u32 _emit_ADDH(unsigned dry_run, u8 buf[], | ||
390 | enum pl330_dst da, u16 val) | ||
391 | { | ||
392 | if (dry_run) | ||
393 | return SZ_DMAADDH; | ||
394 | |||
395 | buf[0] = CMD_DMAADDH; | ||
396 | buf[0] |= (da << 1); | ||
397 | *((u16 *)&buf[1]) = val; | ||
398 | |||
399 | PL330_DBGCMD_DUMP(SZ_DMAADDH, "\tDMAADDH %s %u\n", | ||
400 | da == 1 ? "DA" : "SA", val); | ||
401 | |||
402 | return SZ_DMAADDH; | ||
403 | } | ||
404 | |||
405 | static inline u32 _emit_END(unsigned dry_run, u8 buf[]) | ||
406 | { | ||
407 | if (dry_run) | ||
408 | return SZ_DMAEND; | ||
409 | |||
410 | buf[0] = CMD_DMAEND; | ||
411 | |||
412 | PL330_DBGCMD_DUMP(SZ_DMAEND, "\tDMAEND\n"); | ||
413 | |||
414 | return SZ_DMAEND; | ||
415 | } | ||
416 | |||
417 | static inline u32 _emit_FLUSHP(unsigned dry_run, u8 buf[], u8 peri) | ||
418 | { | ||
419 | if (dry_run) | ||
420 | return SZ_DMAFLUSHP; | ||
421 | |||
422 | buf[0] = CMD_DMAFLUSHP; | ||
423 | |||
424 | peri &= 0x1f; | ||
425 | peri <<= 3; | ||
426 | buf[1] = peri; | ||
427 | |||
428 | PL330_DBGCMD_DUMP(SZ_DMAFLUSHP, "\tDMAFLUSHP %u\n", peri >> 3); | ||
429 | |||
430 | return SZ_DMAFLUSHP; | ||
431 | } | ||
432 | |||
433 | static inline u32 _emit_LD(unsigned dry_run, u8 buf[], enum pl330_cond cond) | ||
434 | { | ||
435 | if (dry_run) | ||
436 | return SZ_DMALD; | ||
437 | |||
438 | buf[0] = CMD_DMALD; | ||
439 | |||
440 | if (cond == SINGLE) | ||
441 | buf[0] |= (0 << 1) | (1 << 0); | ||
442 | else if (cond == BURST) | ||
443 | buf[0] |= (1 << 1) | (1 << 0); | ||
444 | |||
445 | PL330_DBGCMD_DUMP(SZ_DMALD, "\tDMALD%c\n", | ||
446 | cond == SINGLE ? 'S' : (cond == BURST ? 'B' : 'A')); | ||
447 | |||
448 | return SZ_DMALD; | ||
449 | } | ||
450 | |||
451 | static inline u32 _emit_LDP(unsigned dry_run, u8 buf[], | ||
452 | enum pl330_cond cond, u8 peri) | ||
453 | { | ||
454 | if (dry_run) | ||
455 | return SZ_DMALDP; | ||
456 | |||
457 | buf[0] = CMD_DMALDP; | ||
458 | |||
459 | if (cond == BURST) | ||
460 | buf[0] |= (1 << 1); | ||
461 | |||
462 | peri &= 0x1f; | ||
463 | peri <<= 3; | ||
464 | buf[1] = peri; | ||
465 | |||
466 | PL330_DBGCMD_DUMP(SZ_DMALDP, "\tDMALDP%c %u\n", | ||
467 | cond == SINGLE ? 'S' : 'B', peri >> 3); | ||
468 | |||
469 | return SZ_DMALDP; | ||
470 | } | ||
471 | |||
472 | static inline u32 _emit_LP(unsigned dry_run, u8 buf[], | ||
473 | unsigned loop, u8 cnt) | ||
474 | { | ||
475 | if (dry_run) | ||
476 | return SZ_DMALP; | ||
477 | |||
478 | buf[0] = CMD_DMALP; | ||
479 | |||
480 | if (loop) | ||
481 | buf[0] |= (1 << 1); | ||
482 | |||
483 | cnt--; /* DMAC increments by 1 internally */ | ||
484 | buf[1] = cnt; | ||
485 | |||
486 | PL330_DBGCMD_DUMP(SZ_DMALP, "\tDMALP_%c %u\n", loop ? '1' : '0', cnt); | ||
487 | |||
488 | return SZ_DMALP; | ||
489 | } | ||
490 | |||
491 | struct _arg_LPEND { | ||
492 | enum pl330_cond cond; | ||
493 | bool forever; | ||
494 | unsigned loop; | ||
495 | u8 bjump; | ||
496 | }; | ||
497 | |||
498 | static inline u32 _emit_LPEND(unsigned dry_run, u8 buf[], | ||
499 | const struct _arg_LPEND *arg) | ||
500 | { | ||
501 | enum pl330_cond cond = arg->cond; | ||
502 | bool forever = arg->forever; | ||
503 | unsigned loop = arg->loop; | ||
504 | u8 bjump = arg->bjump; | ||
505 | |||
506 | if (dry_run) | ||
507 | return SZ_DMALPEND; | ||
508 | |||
509 | buf[0] = CMD_DMALPEND; | ||
510 | |||
511 | if (loop) | ||
512 | buf[0] |= (1 << 2); | ||
513 | |||
514 | if (!forever) | ||
515 | buf[0] |= (1 << 4); | ||
516 | |||
517 | if (cond == SINGLE) | ||
518 | buf[0] |= (0 << 1) | (1 << 0); | ||
519 | else if (cond == BURST) | ||
520 | buf[0] |= (1 << 1) | (1 << 0); | ||
521 | |||
522 | buf[1] = bjump; | ||
523 | |||
524 | PL330_DBGCMD_DUMP(SZ_DMALPEND, "\tDMALP%s%c_%c bjmpto_%x\n", | ||
525 | forever ? "FE" : "END", | ||
526 | cond == SINGLE ? 'S' : (cond == BURST ? 'B' : 'A'), | ||
527 | loop ? '1' : '0', | ||
528 | bjump); | ||
529 | |||
530 | return SZ_DMALPEND; | ||
531 | } | ||
532 | |||
533 | static inline u32 _emit_KILL(unsigned dry_run, u8 buf[]) | ||
534 | { | ||
535 | if (dry_run) | ||
536 | return SZ_DMAKILL; | ||
537 | |||
538 | buf[0] = CMD_DMAKILL; | ||
539 | |||
540 | return SZ_DMAKILL; | ||
541 | } | ||
542 | |||
543 | static inline u32 _emit_MOV(unsigned dry_run, u8 buf[], | ||
544 | enum dmamov_dst dst, u32 val) | ||
545 | { | ||
546 | if (dry_run) | ||
547 | return SZ_DMAMOV; | ||
548 | |||
549 | buf[0] = CMD_DMAMOV; | ||
550 | buf[1] = dst; | ||
551 | *((u32 *)&buf[2]) = val; | ||
552 | |||
553 | PL330_DBGCMD_DUMP(SZ_DMAMOV, "\tDMAMOV %s 0x%x\n", | ||
554 | dst == SAR ? "SAR" : (dst == DAR ? "DAR" : "CCR"), val); | ||
555 | |||
556 | return SZ_DMAMOV; | ||
557 | } | ||
558 | |||
559 | static inline u32 _emit_NOP(unsigned dry_run, u8 buf[]) | ||
560 | { | ||
561 | if (dry_run) | ||
562 | return SZ_DMANOP; | ||
563 | |||
564 | buf[0] = CMD_DMANOP; | ||
565 | |||
566 | PL330_DBGCMD_DUMP(SZ_DMANOP, "\tDMANOP\n"); | ||
567 | |||
568 | return SZ_DMANOP; | ||
569 | } | ||
570 | |||
571 | static inline u32 _emit_RMB(unsigned dry_run, u8 buf[]) | ||
572 | { | ||
573 | if (dry_run) | ||
574 | return SZ_DMARMB; | ||
575 | |||
576 | buf[0] = CMD_DMARMB; | ||
577 | |||
578 | PL330_DBGCMD_DUMP(SZ_DMARMB, "\tDMARMB\n"); | ||
579 | |||
580 | return SZ_DMARMB; | ||
581 | } | ||
582 | |||
583 | static inline u32 _emit_SEV(unsigned dry_run, u8 buf[], u8 ev) | ||
584 | { | ||
585 | if (dry_run) | ||
586 | return SZ_DMASEV; | ||
587 | |||
588 | buf[0] = CMD_DMASEV; | ||
589 | |||
590 | ev &= 0x1f; | ||
591 | ev <<= 3; | ||
592 | buf[1] = ev; | ||
593 | |||
594 | PL330_DBGCMD_DUMP(SZ_DMASEV, "\tDMASEV %u\n", ev >> 3); | ||
595 | |||
596 | return SZ_DMASEV; | ||
597 | } | ||
598 | |||
599 | static inline u32 _emit_ST(unsigned dry_run, u8 buf[], enum pl330_cond cond) | ||
600 | { | ||
601 | if (dry_run) | ||
602 | return SZ_DMAST; | ||
603 | |||
604 | buf[0] = CMD_DMAST; | ||
605 | |||
606 | if (cond == SINGLE) | ||
607 | buf[0] |= (0 << 1) | (1 << 0); | ||
608 | else if (cond == BURST) | ||
609 | buf[0] |= (1 << 1) | (1 << 0); | ||
610 | |||
611 | PL330_DBGCMD_DUMP(SZ_DMAST, "\tDMAST%c\n", | ||
612 | cond == SINGLE ? 'S' : (cond == BURST ? 'B' : 'A')); | ||
613 | |||
614 | return SZ_DMAST; | ||
615 | } | ||
616 | |||
617 | static inline u32 _emit_STP(unsigned dry_run, u8 buf[], | ||
618 | enum pl330_cond cond, u8 peri) | ||
619 | { | ||
620 | if (dry_run) | ||
621 | return SZ_DMASTP; | ||
622 | |||
623 | buf[0] = CMD_DMASTP; | ||
624 | |||
625 | if (cond == BURST) | ||
626 | buf[0] |= (1 << 1); | ||
627 | |||
628 | peri &= 0x1f; | ||
629 | peri <<= 3; | ||
630 | buf[1] = peri; | ||
631 | |||
632 | PL330_DBGCMD_DUMP(SZ_DMASTP, "\tDMASTP%c %u\n", | ||
633 | cond == SINGLE ? 'S' : 'B', peri >> 3); | ||
634 | |||
635 | return SZ_DMASTP; | ||
636 | } | ||
637 | |||
638 | static inline u32 _emit_STZ(unsigned dry_run, u8 buf[]) | ||
639 | { | ||
640 | if (dry_run) | ||
641 | return SZ_DMASTZ; | ||
642 | |||
643 | buf[0] = CMD_DMASTZ; | ||
644 | |||
645 | PL330_DBGCMD_DUMP(SZ_DMASTZ, "\tDMASTZ\n"); | ||
646 | |||
647 | return SZ_DMASTZ; | ||
648 | } | ||
649 | |||
650 | static inline u32 _emit_WFE(unsigned dry_run, u8 buf[], u8 ev, | ||
651 | unsigned invalidate) | ||
652 | { | ||
653 | if (dry_run) | ||
654 | return SZ_DMAWFE; | ||
655 | |||
656 | buf[0] = CMD_DMAWFE; | ||
657 | |||
658 | ev &= 0x1f; | ||
659 | ev <<= 3; | ||
660 | buf[1] = ev; | ||
661 | |||
662 | if (invalidate) | ||
663 | buf[1] |= (1 << 1); | ||
664 | |||
665 | PL330_DBGCMD_DUMP(SZ_DMAWFE, "\tDMAWFE %u%s\n", | ||
666 | ev >> 3, invalidate ? ", I" : ""); | ||
667 | |||
668 | return SZ_DMAWFE; | ||
669 | } | ||
670 | |||
671 | static inline u32 _emit_WFP(unsigned dry_run, u8 buf[], | ||
672 | enum pl330_cond cond, u8 peri) | ||
673 | { | ||
674 | if (dry_run) | ||
675 | return SZ_DMAWFP; | ||
676 | |||
677 | buf[0] = CMD_DMAWFP; | ||
678 | |||
679 | if (cond == SINGLE) | ||
680 | buf[0] |= (0 << 1) | (0 << 0); | ||
681 | else if (cond == BURST) | ||
682 | buf[0] |= (1 << 1) | (0 << 0); | ||
683 | else | ||
684 | buf[0] |= (0 << 1) | (1 << 0); | ||
685 | |||
686 | peri &= 0x1f; | ||
687 | peri <<= 3; | ||
688 | buf[1] = peri; | ||
689 | |||
690 | PL330_DBGCMD_DUMP(SZ_DMAWFP, "\tDMAWFP%c %u\n", | ||
691 | cond == SINGLE ? 'S' : (cond == BURST ? 'B' : 'P'), peri >> 3); | ||
692 | |||
693 | return SZ_DMAWFP; | ||
694 | } | ||
695 | |||
696 | static inline u32 _emit_WMB(unsigned dry_run, u8 buf[]) | ||
697 | { | ||
698 | if (dry_run) | ||
699 | return SZ_DMAWMB; | ||
700 | |||
701 | buf[0] = CMD_DMAWMB; | ||
702 | |||
703 | PL330_DBGCMD_DUMP(SZ_DMAWMB, "\tDMAWMB\n"); | ||
704 | |||
705 | return SZ_DMAWMB; | ||
706 | } | ||
707 | |||
708 | struct _arg_GO { | ||
709 | u8 chan; | ||
710 | u32 addr; | ||
711 | unsigned ns; | ||
712 | }; | ||
713 | |||
714 | static inline u32 _emit_GO(unsigned dry_run, u8 buf[], | ||
715 | const struct _arg_GO *arg) | ||
716 | { | ||
717 | u8 chan = arg->chan; | ||
718 | u32 addr = arg->addr; | ||
719 | unsigned ns = arg->ns; | ||
720 | |||
721 | if (dry_run) | ||
722 | return SZ_DMAGO; | ||
723 | |||
724 | buf[0] = CMD_DMAGO; | ||
725 | buf[0] |= (ns << 1); | ||
726 | |||
727 | buf[1] = chan & 0x7; | ||
728 | |||
729 | *((u32 *)&buf[2]) = addr; | ||
730 | |||
731 | return SZ_DMAGO; | ||
732 | } | ||
733 | |||
734 | #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) | ||
735 | |||
736 | /* Returns Time-Out */ | ||
737 | static bool _until_dmac_idle(struct pl330_thread *thrd) | ||
738 | { | ||
739 | void __iomem *regs = thrd->dmac->pinfo->base; | ||
740 | unsigned long loops = msecs_to_loops(5); | ||
741 | |||
742 | do { | ||
743 | /* Until Manager is Idle */ | ||
744 | if (!(readl(regs + DBGSTATUS) & DBG_BUSY)) | ||
745 | break; | ||
746 | |||
747 | cpu_relax(); | ||
748 | } while (--loops); | ||
749 | |||
750 | if (!loops) | ||
751 | return true; | ||
752 | |||
753 | return false; | ||
754 | } | ||
755 | |||
756 | static inline void _execute_DBGINSN(struct pl330_thread *thrd, | ||
757 | u8 insn[], bool as_manager) | ||
758 | { | ||
759 | void __iomem *regs = thrd->dmac->pinfo->base; | ||
760 | u32 val; | ||
761 | |||
762 | val = (insn[0] << 16) | (insn[1] << 24); | ||
763 | if (!as_manager) { | ||
764 | val |= (1 << 0); | ||
765 | val |= (thrd->id << 8); /* Channel Number */ | ||
766 | } | ||
767 | writel(val, regs + DBGINST0); | ||
768 | |||
769 | val = *((u32 *)&insn[2]); | ||
770 | writel(val, regs + DBGINST1); | ||
771 | |||
772 | /* If timed out due to halted state-machine */ | ||
773 | if (_until_dmac_idle(thrd)) { | ||
774 | dev_err(thrd->dmac->pinfo->dev, "DMAC halted!\n"); | ||
775 | return; | ||
776 | } | ||
777 | |||
778 | /* Get going */ | ||
779 | writel(0, regs + DBGCMD); | ||
780 | } | ||
781 | |||
782 | static inline u32 _state(struct pl330_thread *thrd) | ||
783 | { | ||
784 | void __iomem *regs = thrd->dmac->pinfo->base; | ||
785 | u32 val; | ||
786 | |||
787 | if (is_manager(thrd)) | ||
788 | val = readl(regs + DS) & 0xf; | ||
789 | else | ||
790 | val = readl(regs + CS(thrd->id)) & 0xf; | ||
791 | |||
792 | switch (val) { | ||
793 | case DS_ST_STOP: | ||
794 | return PL330_STATE_STOPPED; | ||
795 | case DS_ST_EXEC: | ||
796 | return PL330_STATE_EXECUTING; | ||
797 | case DS_ST_CMISS: | ||
798 | return PL330_STATE_CACHEMISS; | ||
799 | case DS_ST_UPDTPC: | ||
800 | return PL330_STATE_UPDTPC; | ||
801 | case DS_ST_WFE: | ||
802 | return PL330_STATE_WFE; | ||
803 | case DS_ST_FAULT: | ||
804 | return PL330_STATE_FAULTING; | ||
805 | case DS_ST_ATBRR: | ||
806 | if (is_manager(thrd)) | ||
807 | return PL330_STATE_INVALID; | ||
808 | else | ||
809 | return PL330_STATE_ATBARRIER; | ||
810 | case DS_ST_QBUSY: | ||
811 | if (is_manager(thrd)) | ||
812 | return PL330_STATE_INVALID; | ||
813 | else | ||
814 | return PL330_STATE_QUEUEBUSY; | ||
815 | case DS_ST_WFP: | ||
816 | if (is_manager(thrd)) | ||
817 | return PL330_STATE_INVALID; | ||
818 | else | ||
819 | return PL330_STATE_WFP; | ||
820 | case DS_ST_KILL: | ||
821 | if (is_manager(thrd)) | ||
822 | return PL330_STATE_INVALID; | ||
823 | else | ||
824 | return PL330_STATE_KILLING; | ||
825 | case DS_ST_CMPLT: | ||
826 | if (is_manager(thrd)) | ||
827 | return PL330_STATE_INVALID; | ||
828 | else | ||
829 | return PL330_STATE_COMPLETING; | ||
830 | case DS_ST_FLTCMP: | ||
831 | if (is_manager(thrd)) | ||
832 | return PL330_STATE_INVALID; | ||
833 | else | ||
834 | return PL330_STATE_FAULT_COMPLETING; | ||
835 | default: | ||
836 | return PL330_STATE_INVALID; | ||
837 | } | ||
838 | } | ||
839 | |||
840 | /* If the request 'req' of thread 'thrd' is currently active */ | ||
841 | static inline bool _req_active(struct pl330_thread *thrd, | ||
842 | struct _pl330_req *req) | ||
843 | { | ||
844 | void __iomem *regs = thrd->dmac->pinfo->base; | ||
845 | u32 buf = req->mc_bus, pc = readl(regs + CPC(thrd->id)); | ||
846 | |||
847 | if (IS_FREE(req)) | ||
848 | return false; | ||
849 | |||
850 | return (pc >= buf && pc <= buf + req->mc_len) ? true : false; | ||
851 | } | ||
852 | |||
853 | /* Returns 0 if the thread is inactive, ID of active req + 1 otherwise */ | ||
854 | static inline unsigned _thrd_active(struct pl330_thread *thrd) | ||
855 | { | ||
856 | if (_req_active(thrd, &thrd->req[0])) | ||
857 | return 1; /* First req active */ | ||
858 | |||
859 | if (_req_active(thrd, &thrd->req[1])) | ||
860 | return 2; /* Second req active */ | ||
861 | |||
862 | return 0; | ||
863 | } | ||
864 | |||
865 | static void _stop(struct pl330_thread *thrd) | ||
866 | { | ||
867 | void __iomem *regs = thrd->dmac->pinfo->base; | ||
868 | u8 insn[6] = {0, 0, 0, 0, 0, 0}; | ||
869 | |||
870 | if (_state(thrd) == PL330_STATE_FAULT_COMPLETING) | ||
871 | UNTIL(thrd, PL330_STATE_FAULTING | PL330_STATE_KILLING); | ||
872 | |||
873 | /* Return if nothing needs to be done */ | ||
874 | if (_state(thrd) == PL330_STATE_COMPLETING | ||
875 | || _state(thrd) == PL330_STATE_KILLING | ||
876 | || _state(thrd) == PL330_STATE_STOPPED) | ||
877 | return; | ||
878 | |||
879 | _emit_KILL(0, insn); | ||
880 | |||
881 | /* Stop generating interrupts for SEV */ | ||
882 | writel(readl(regs + INTEN) & ~(1 << thrd->ev), regs + INTEN); | ||
883 | |||
884 | _execute_DBGINSN(thrd, insn, is_manager(thrd)); | ||
885 | } | ||
886 | |||
887 | /* Start doing req 'idx' of thread 'thrd' */ | ||
888 | static bool _trigger(struct pl330_thread *thrd) | ||
889 | { | ||
890 | void __iomem *regs = thrd->dmac->pinfo->base; | ||
891 | struct _pl330_req *req; | ||
892 | struct pl330_req *r; | ||
893 | struct _arg_GO go; | ||
894 | unsigned ns; | ||
895 | u8 insn[6] = {0, 0, 0, 0, 0, 0}; | ||
896 | |||
897 | /* Return if already ACTIVE */ | ||
898 | if (_state(thrd) != PL330_STATE_STOPPED) | ||
899 | return true; | ||
900 | |||
901 | if (!IS_FREE(&thrd->req[1 - thrd->lstenq])) | ||
902 | req = &thrd->req[1 - thrd->lstenq]; | ||
903 | else if (!IS_FREE(&thrd->req[thrd->lstenq])) | ||
904 | req = &thrd->req[thrd->lstenq]; | ||
905 | else | ||
906 | req = NULL; | ||
907 | |||
908 | /* Return if no request */ | ||
909 | if (!req || !req->r) | ||
910 | return true; | ||
911 | |||
912 | r = req->r; | ||
913 | |||
914 | if (r->cfg) | ||
915 | ns = r->cfg->nonsecure ? 1 : 0; | ||
916 | else if (readl(regs + CS(thrd->id)) & CS_CNS) | ||
917 | ns = 1; | ||
918 | else | ||
919 | ns = 0; | ||
920 | |||
921 | /* See 'Abort Sources' point-4 at Page 2-25 */ | ||
922 | if (_manager_ns(thrd) && !ns) | ||
923 | dev_info(thrd->dmac->pinfo->dev, "%s:%d Recipe for ABORT!\n", | ||
924 | __func__, __LINE__); | ||
925 | |||
926 | go.chan = thrd->id; | ||
927 | go.addr = req->mc_bus; | ||
928 | go.ns = ns; | ||
929 | _emit_GO(0, insn, &go); | ||
930 | |||
931 | /* Set to generate interrupts for SEV */ | ||
932 | writel(readl(regs + INTEN) | (1 << thrd->ev), regs + INTEN); | ||
933 | |||
934 | /* Only manager can execute GO */ | ||
935 | _execute_DBGINSN(thrd, insn, true); | ||
936 | |||
937 | return true; | ||
938 | } | ||
939 | |||
940 | static bool _start(struct pl330_thread *thrd) | ||
941 | { | ||
942 | switch (_state(thrd)) { | ||
943 | case PL330_STATE_FAULT_COMPLETING: | ||
944 | UNTIL(thrd, PL330_STATE_FAULTING | PL330_STATE_KILLING); | ||
945 | |||
946 | if (_state(thrd) == PL330_STATE_KILLING) | ||
947 | UNTIL(thrd, PL330_STATE_STOPPED) | ||
948 | |||
949 | case PL330_STATE_FAULTING: | ||
950 | _stop(thrd); | ||
951 | |||
952 | case PL330_STATE_KILLING: | ||
953 | case PL330_STATE_COMPLETING: | ||
954 | UNTIL(thrd, PL330_STATE_STOPPED) | ||
955 | |||
956 | case PL330_STATE_STOPPED: | ||
957 | return _trigger(thrd); | ||
958 | |||
959 | case PL330_STATE_WFP: | ||
960 | case PL330_STATE_QUEUEBUSY: | ||
961 | case PL330_STATE_ATBARRIER: | ||
962 | case PL330_STATE_UPDTPC: | ||
963 | case PL330_STATE_CACHEMISS: | ||
964 | case PL330_STATE_EXECUTING: | ||
965 | return true; | ||
966 | |||
967 | case PL330_STATE_WFE: /* For RESUME, nothing yet */ | ||
968 | default: | ||
969 | return false; | ||
970 | } | ||
971 | } | ||
972 | |||
973 | static inline int _ldst_memtomem(unsigned dry_run, u8 buf[], | ||
974 | const struct _xfer_spec *pxs, int cyc) | ||
975 | { | ||
976 | int off = 0; | ||
977 | |||
978 | while (cyc--) { | ||
979 | off += _emit_LD(dry_run, &buf[off], ALWAYS); | ||
980 | off += _emit_RMB(dry_run, &buf[off]); | ||
981 | off += _emit_ST(dry_run, &buf[off], ALWAYS); | ||
982 | off += _emit_WMB(dry_run, &buf[off]); | ||
983 | } | ||
984 | |||
985 | return off; | ||
986 | } | ||
987 | |||
988 | static inline int _ldst_devtomem(unsigned dry_run, u8 buf[], | ||
989 | const struct _xfer_spec *pxs, int cyc) | ||
990 | { | ||
991 | int off = 0; | ||
992 | |||
993 | while (cyc--) { | ||
994 | off += _emit_WFP(dry_run, &buf[off], SINGLE, pxs->r->peri); | ||
995 | off += _emit_LDP(dry_run, &buf[off], SINGLE, pxs->r->peri); | ||
996 | off += _emit_ST(dry_run, &buf[off], ALWAYS); | ||
997 | off += _emit_FLUSHP(dry_run, &buf[off], pxs->r->peri); | ||
998 | } | ||
999 | |||
1000 | return off; | ||
1001 | } | ||
1002 | |||
1003 | static inline int _ldst_memtodev(unsigned dry_run, u8 buf[], | ||
1004 | const struct _xfer_spec *pxs, int cyc) | ||
1005 | { | ||
1006 | int off = 0; | ||
1007 | |||
1008 | while (cyc--) { | ||
1009 | off += _emit_WFP(dry_run, &buf[off], SINGLE, pxs->r->peri); | ||
1010 | off += _emit_LD(dry_run, &buf[off], ALWAYS); | ||
1011 | off += _emit_STP(dry_run, &buf[off], SINGLE, pxs->r->peri); | ||
1012 | off += _emit_FLUSHP(dry_run, &buf[off], pxs->r->peri); | ||
1013 | } | ||
1014 | |||
1015 | return off; | ||
1016 | } | ||
1017 | |||
1018 | static int _bursts(unsigned dry_run, u8 buf[], | ||
1019 | const struct _xfer_spec *pxs, int cyc) | ||
1020 | { | ||
1021 | int off = 0; | ||
1022 | |||
1023 | switch (pxs->r->rqtype) { | ||
1024 | case MEMTODEV: | ||
1025 | off += _ldst_memtodev(dry_run, &buf[off], pxs, cyc); | ||
1026 | break; | ||
1027 | case DEVTOMEM: | ||
1028 | off += _ldst_devtomem(dry_run, &buf[off], pxs, cyc); | ||
1029 | break; | ||
1030 | case MEMTOMEM: | ||
1031 | off += _ldst_memtomem(dry_run, &buf[off], pxs, cyc); | ||
1032 | break; | ||
1033 | default: | ||
1034 | off += 0x40000000; /* Scare off the Client */ | ||
1035 | break; | ||
1036 | } | ||
1037 | |||
1038 | return off; | ||
1039 | } | ||
1040 | |||
1041 | /* Returns bytes consumed and updates bursts */ | ||
1042 | static inline int _loop(unsigned dry_run, u8 buf[], | ||
1043 | unsigned long *bursts, const struct _xfer_spec *pxs) | ||
1044 | { | ||
1045 | int cyc, cycmax, szlp, szlpend, szbrst, off; | ||
1046 | unsigned lcnt0, lcnt1, ljmp0, ljmp1; | ||
1047 | struct _arg_LPEND lpend; | ||
1048 | |||
1049 | /* Max iterations possibile in DMALP is 256 */ | ||
1050 | if (*bursts >= 256*256) { | ||
1051 | lcnt1 = 256; | ||
1052 | lcnt0 = 256; | ||
1053 | cyc = *bursts / lcnt1 / lcnt0; | ||
1054 | } else if (*bursts > 256) { | ||
1055 | lcnt1 = 256; | ||
1056 | lcnt0 = *bursts / lcnt1; | ||
1057 | cyc = 1; | ||
1058 | } else { | ||
1059 | lcnt1 = *bursts; | ||
1060 | lcnt0 = 0; | ||
1061 | cyc = 1; | ||
1062 | } | ||
1063 | |||
1064 | szlp = _emit_LP(1, buf, 0, 0); | ||
1065 | szbrst = _bursts(1, buf, pxs, 1); | ||
1066 | |||
1067 | lpend.cond = ALWAYS; | ||
1068 | lpend.forever = false; | ||
1069 | lpend.loop = 0; | ||
1070 | lpend.bjump = 0; | ||
1071 | szlpend = _emit_LPEND(1, buf, &lpend); | ||
1072 | |||
1073 | if (lcnt0) { | ||
1074 | szlp *= 2; | ||
1075 | szlpend *= 2; | ||
1076 | } | ||
1077 | |||
1078 | /* | ||
1079 | * Max bursts that we can unroll due to limit on the | ||
1080 | * size of backward jump that can be encoded in DMALPEND | ||
1081 | * which is 8-bits and hence 255 | ||
1082 | */ | ||
1083 | cycmax = (255 - (szlp + szlpend)) / szbrst; | ||
1084 | |||
1085 | cyc = (cycmax < cyc) ? cycmax : cyc; | ||
1086 | |||
1087 | off = 0; | ||
1088 | |||
1089 | if (lcnt0) { | ||
1090 | off += _emit_LP(dry_run, &buf[off], 0, lcnt0); | ||
1091 | ljmp0 = off; | ||
1092 | } | ||
1093 | |||
1094 | off += _emit_LP(dry_run, &buf[off], 1, lcnt1); | ||
1095 | ljmp1 = off; | ||
1096 | |||
1097 | off += _bursts(dry_run, &buf[off], pxs, cyc); | ||
1098 | |||
1099 | lpend.cond = ALWAYS; | ||
1100 | lpend.forever = false; | ||
1101 | lpend.loop = 1; | ||
1102 | lpend.bjump = off - ljmp1; | ||
1103 | off += _emit_LPEND(dry_run, &buf[off], &lpend); | ||
1104 | |||
1105 | if (lcnt0) { | ||
1106 | lpend.cond = ALWAYS; | ||
1107 | lpend.forever = false; | ||
1108 | lpend.loop = 0; | ||
1109 | lpend.bjump = off - ljmp0; | ||
1110 | off += _emit_LPEND(dry_run, &buf[off], &lpend); | ||
1111 | } | ||
1112 | |||
1113 | *bursts = lcnt1 * cyc; | ||
1114 | if (lcnt0) | ||
1115 | *bursts *= lcnt0; | ||
1116 | |||
1117 | return off; | ||
1118 | } | ||
1119 | |||
1120 | static inline int _setup_loops(unsigned dry_run, u8 buf[], | ||
1121 | const struct _xfer_spec *pxs) | ||
1122 | { | ||
1123 | struct pl330_xfer *x = pxs->x; | ||
1124 | u32 ccr = pxs->ccr; | ||
1125 | unsigned long c, bursts = BYTE_TO_BURST(x->bytes, ccr); | ||
1126 | int off = 0; | ||
1127 | |||
1128 | while (bursts) { | ||
1129 | c = bursts; | ||
1130 | off += _loop(dry_run, &buf[off], &c, pxs); | ||
1131 | bursts -= c; | ||
1132 | } | ||
1133 | |||
1134 | return off; | ||
1135 | } | ||
1136 | |||
1137 | static inline int _setup_xfer(unsigned dry_run, u8 buf[], | ||
1138 | const struct _xfer_spec *pxs) | ||
1139 | { | ||
1140 | struct pl330_xfer *x = pxs->x; | ||
1141 | int off = 0; | ||
1142 | |||
1143 | /* DMAMOV SAR, x->src_addr */ | ||
1144 | off += _emit_MOV(dry_run, &buf[off], SAR, x->src_addr); | ||
1145 | /* DMAMOV DAR, x->dst_addr */ | ||
1146 | off += _emit_MOV(dry_run, &buf[off], DAR, x->dst_addr); | ||
1147 | |||
1148 | /* Setup Loop(s) */ | ||
1149 | off += _setup_loops(dry_run, &buf[off], pxs); | ||
1150 | |||
1151 | return off; | ||
1152 | } | ||
1153 | |||
1154 | /* | ||
1155 | * A req is a sequence of one or more xfer units. | ||
1156 | * Returns the number of bytes taken to setup the MC for the req. | ||
1157 | */ | ||
1158 | static int _setup_req(unsigned dry_run, struct pl330_thread *thrd, | ||
1159 | unsigned index, struct _xfer_spec *pxs) | ||
1160 | { | ||
1161 | struct _pl330_req *req = &thrd->req[index]; | ||
1162 | struct pl330_xfer *x; | ||
1163 | u8 *buf = req->mc_cpu; | ||
1164 | int off = 0; | ||
1165 | |||
1166 | PL330_DBGMC_START(req->mc_bus); | ||
1167 | |||
1168 | /* DMAMOV CCR, ccr */ | ||
1169 | off += _emit_MOV(dry_run, &buf[off], CCR, pxs->ccr); | ||
1170 | |||
1171 | x = pxs->r->x; | ||
1172 | do { | ||
1173 | /* Error if xfer length is not aligned at burst size */ | ||
1174 | if (x->bytes % (BRST_SIZE(pxs->ccr) * BRST_LEN(pxs->ccr))) | ||
1175 | return -EINVAL; | ||
1176 | |||
1177 | pxs->x = x; | ||
1178 | off += _setup_xfer(dry_run, &buf[off], pxs); | ||
1179 | |||
1180 | x = x->next; | ||
1181 | } while (x); | ||
1182 | |||
1183 | /* DMASEV peripheral/event */ | ||
1184 | off += _emit_SEV(dry_run, &buf[off], thrd->ev); | ||
1185 | /* DMAEND */ | ||
1186 | off += _emit_END(dry_run, &buf[off]); | ||
1187 | |||
1188 | return off; | ||
1189 | } | ||
1190 | |||
1191 | static inline u32 _prepare_ccr(const struct pl330_reqcfg *rqc) | ||
1192 | { | ||
1193 | u32 ccr = 0; | ||
1194 | |||
1195 | if (rqc->src_inc) | ||
1196 | ccr |= CC_SRCINC; | ||
1197 | |||
1198 | if (rqc->dst_inc) | ||
1199 | ccr |= CC_DSTINC; | ||
1200 | |||
1201 | /* We set same protection levels for Src and DST for now */ | ||
1202 | if (rqc->privileged) | ||
1203 | ccr |= CC_SRCPRI | CC_DSTPRI; | ||
1204 | if (rqc->nonsecure) | ||
1205 | ccr |= CC_SRCNS | CC_DSTNS; | ||
1206 | if (rqc->insnaccess) | ||
1207 | ccr |= CC_SRCIA | CC_DSTIA; | ||
1208 | |||
1209 | ccr |= (((rqc->brst_len - 1) & 0xf) << CC_SRCBRSTLEN_SHFT); | ||
1210 | ccr |= (((rqc->brst_len - 1) & 0xf) << CC_DSTBRSTLEN_SHFT); | ||
1211 | |||
1212 | ccr |= (rqc->brst_size << CC_SRCBRSTSIZE_SHFT); | ||
1213 | ccr |= (rqc->brst_size << CC_DSTBRSTSIZE_SHFT); | ||
1214 | |||
1215 | ccr |= (rqc->dcctl << CC_SRCCCTRL_SHFT); | ||
1216 | ccr |= (rqc->scctl << CC_DSTCCTRL_SHFT); | ||
1217 | |||
1218 | ccr |= (rqc->swap << CC_SWAP_SHFT); | ||
1219 | |||
1220 | return ccr; | ||
1221 | } | ||
1222 | |||
1223 | static inline bool _is_valid(u32 ccr) | ||
1224 | { | ||
1225 | enum pl330_dstcachectrl dcctl; | ||
1226 | enum pl330_srccachectrl scctl; | ||
1227 | |||
1228 | dcctl = (ccr >> CC_DSTCCTRL_SHFT) & CC_DRCCCTRL_MASK; | ||
1229 | scctl = (ccr >> CC_SRCCCTRL_SHFT) & CC_SRCCCTRL_MASK; | ||
1230 | |||
1231 | if (dcctl == DINVALID1 || dcctl == DINVALID2 | ||
1232 | || scctl == SINVALID1 || scctl == SINVALID2) | ||
1233 | return false; | ||
1234 | else | ||
1235 | return true; | ||
1236 | } | ||
1237 | |||
1238 | /* | ||
1239 | * Submit a list of xfers after which the client wants notification. | ||
1240 | * Client is not notified after each xfer unit, just once after all | ||
1241 | * xfer units are done or some error occurs. | ||
1242 | */ | ||
1243 | int pl330_submit_req(void *ch_id, struct pl330_req *r) | ||
1244 | { | ||
1245 | struct pl330_thread *thrd = ch_id; | ||
1246 | struct pl330_dmac *pl330; | ||
1247 | struct pl330_info *pi; | ||
1248 | struct _xfer_spec xs; | ||
1249 | unsigned long flags; | ||
1250 | void __iomem *regs; | ||
1251 | unsigned idx; | ||
1252 | u32 ccr; | ||
1253 | int ret = 0; | ||
1254 | |||
1255 | /* No Req or Unacquired Channel or DMAC */ | ||
1256 | if (!r || !thrd || thrd->free) | ||
1257 | return -EINVAL; | ||
1258 | |||
1259 | pl330 = thrd->dmac; | ||
1260 | pi = pl330->pinfo; | ||
1261 | regs = pi->base; | ||
1262 | |||
1263 | if (pl330->state == DYING | ||
1264 | || pl330->dmac_tbd.reset_chan & (1 << thrd->id)) { | ||
1265 | dev_info(thrd->dmac->pinfo->dev, "%s:%d\n", | ||
1266 | __func__, __LINE__); | ||
1267 | return -EAGAIN; | ||
1268 | } | ||
1269 | |||
1270 | /* If request for non-existing peripheral */ | ||
1271 | if (r->rqtype != MEMTOMEM && r->peri >= pi->pcfg.num_peri) { | ||
1272 | dev_info(thrd->dmac->pinfo->dev, | ||
1273 | "%s:%d Invalid peripheral(%u)!\n", | ||
1274 | __func__, __LINE__, r->peri); | ||
1275 | return -EINVAL; | ||
1276 | } | ||
1277 | |||
1278 | spin_lock_irqsave(&pl330->lock, flags); | ||
1279 | |||
1280 | if (_queue_full(thrd)) { | ||
1281 | ret = -EAGAIN; | ||
1282 | goto xfer_exit; | ||
1283 | } | ||
1284 | |||
1285 | /* Prefer Secure Channel */ | ||
1286 | if (!_manager_ns(thrd)) | ||
1287 | r->cfg->nonsecure = 0; | ||
1288 | else | ||
1289 | r->cfg->nonsecure = 1; | ||
1290 | |||
1291 | /* Use last settings, if not provided */ | ||
1292 | if (r->cfg) | ||
1293 | ccr = _prepare_ccr(r->cfg); | ||
1294 | else | ||
1295 | ccr = readl(regs + CC(thrd->id)); | ||
1296 | |||
1297 | /* If this req doesn't have valid xfer settings */ | ||
1298 | if (!_is_valid(ccr)) { | ||
1299 | ret = -EINVAL; | ||
1300 | dev_info(thrd->dmac->pinfo->dev, "%s:%d Invalid CCR(%x)!\n", | ||
1301 | __func__, __LINE__, ccr); | ||
1302 | goto xfer_exit; | ||
1303 | } | ||
1304 | |||
1305 | idx = IS_FREE(&thrd->req[0]) ? 0 : 1; | ||
1306 | |||
1307 | xs.ccr = ccr; | ||
1308 | xs.r = r; | ||
1309 | |||
1310 | /* First dry run to check if req is acceptable */ | ||
1311 | ret = _setup_req(1, thrd, idx, &xs); | ||
1312 | if (ret < 0) | ||
1313 | goto xfer_exit; | ||
1314 | |||
1315 | if (ret > pi->mcbufsz / 2) { | ||
1316 | dev_info(thrd->dmac->pinfo->dev, | ||
1317 | "%s:%d Trying increasing mcbufsz\n", | ||
1318 | __func__, __LINE__); | ||
1319 | ret = -ENOMEM; | ||
1320 | goto xfer_exit; | ||
1321 | } | ||
1322 | |||
1323 | /* Hook the request */ | ||
1324 | thrd->lstenq = idx; | ||
1325 | thrd->req[idx].mc_len = _setup_req(0, thrd, idx, &xs); | ||
1326 | thrd->req[idx].r = r; | ||
1327 | |||
1328 | ret = 0; | ||
1329 | |||
1330 | xfer_exit: | ||
1331 | spin_unlock_irqrestore(&pl330->lock, flags); | ||
1332 | |||
1333 | return ret; | ||
1334 | } | ||
1335 | EXPORT_SYMBOL(pl330_submit_req); | ||
1336 | |||
1337 | static void pl330_dotask(unsigned long data) | ||
1338 | { | ||
1339 | struct pl330_dmac *pl330 = (struct pl330_dmac *) data; | ||
1340 | struct pl330_info *pi = pl330->pinfo; | ||
1341 | unsigned long flags; | ||
1342 | int i; | ||
1343 | |||
1344 | spin_lock_irqsave(&pl330->lock, flags); | ||
1345 | |||
1346 | /* The DMAC itself gone nuts */ | ||
1347 | if (pl330->dmac_tbd.reset_dmac) { | ||
1348 | pl330->state = DYING; | ||
1349 | /* Reset the manager too */ | ||
1350 | pl330->dmac_tbd.reset_mngr = true; | ||
1351 | /* Clear the reset flag */ | ||
1352 | pl330->dmac_tbd.reset_dmac = false; | ||
1353 | } | ||
1354 | |||
1355 | if (pl330->dmac_tbd.reset_mngr) { | ||
1356 | _stop(pl330->manager); | ||
1357 | /* Reset all channels */ | ||
1358 | pl330->dmac_tbd.reset_chan = (1 << pi->pcfg.num_chan) - 1; | ||
1359 | /* Clear the reset flag */ | ||
1360 | pl330->dmac_tbd.reset_mngr = false; | ||
1361 | } | ||
1362 | |||
1363 | for (i = 0; i < pi->pcfg.num_chan; i++) { | ||
1364 | |||
1365 | if (pl330->dmac_tbd.reset_chan & (1 << i)) { | ||
1366 | struct pl330_thread *thrd = &pl330->channels[i]; | ||
1367 | void __iomem *regs = pi->base; | ||
1368 | enum pl330_op_err err; | ||
1369 | |||
1370 | _stop(thrd); | ||
1371 | |||
1372 | if (readl(regs + FSC) & (1 << thrd->id)) | ||
1373 | err = PL330_ERR_FAIL; | ||
1374 | else | ||
1375 | err = PL330_ERR_ABORT; | ||
1376 | |||
1377 | spin_unlock_irqrestore(&pl330->lock, flags); | ||
1378 | |||
1379 | _callback(thrd->req[1 - thrd->lstenq].r, err); | ||
1380 | _callback(thrd->req[thrd->lstenq].r, err); | ||
1381 | |||
1382 | spin_lock_irqsave(&pl330->lock, flags); | ||
1383 | |||
1384 | thrd->req[0].r = NULL; | ||
1385 | thrd->req[1].r = NULL; | ||
1386 | MARK_FREE(&thrd->req[0]); | ||
1387 | MARK_FREE(&thrd->req[1]); | ||
1388 | |||
1389 | /* Clear the reset flag */ | ||
1390 | pl330->dmac_tbd.reset_chan &= ~(1 << i); | ||
1391 | } | ||
1392 | } | ||
1393 | |||
1394 | spin_unlock_irqrestore(&pl330->lock, flags); | ||
1395 | |||
1396 | return; | ||
1397 | } | ||
1398 | |||
1399 | /* Returns 1 if state was updated, 0 otherwise */ | ||
1400 | int pl330_update(const struct pl330_info *pi) | ||
1401 | { | ||
1402 | struct _pl330_req *rqdone; | ||
1403 | struct pl330_dmac *pl330; | ||
1404 | unsigned long flags; | ||
1405 | void __iomem *regs; | ||
1406 | u32 val; | ||
1407 | int id, ev, ret = 0; | ||
1408 | |||
1409 | if (!pi || !pi->pl330_data) | ||
1410 | return 0; | ||
1411 | |||
1412 | regs = pi->base; | ||
1413 | pl330 = pi->pl330_data; | ||
1414 | |||
1415 | spin_lock_irqsave(&pl330->lock, flags); | ||
1416 | |||
1417 | val = readl(regs + FSM) & 0x1; | ||
1418 | if (val) | ||
1419 | pl330->dmac_tbd.reset_mngr = true; | ||
1420 | else | ||
1421 | pl330->dmac_tbd.reset_mngr = false; | ||
1422 | |||
1423 | val = readl(regs + FSC) & ((1 << pi->pcfg.num_chan) - 1); | ||
1424 | pl330->dmac_tbd.reset_chan |= val; | ||
1425 | if (val) { | ||
1426 | int i = 0; | ||
1427 | while (i < pi->pcfg.num_chan) { | ||
1428 | if (val & (1 << i)) { | ||
1429 | dev_info(pi->dev, | ||
1430 | "Reset Channel-%d\t CS-%x FTC-%x\n", | ||
1431 | i, readl(regs + CS(i)), | ||
1432 | readl(regs + FTC(i))); | ||
1433 | _stop(&pl330->channels[i]); | ||
1434 | } | ||
1435 | i++; | ||
1436 | } | ||
1437 | } | ||
1438 | |||
1439 | /* Check which event happened i.e, thread notified */ | ||
1440 | val = readl(regs + ES); | ||
1441 | if (pi->pcfg.num_events < 32 | ||
1442 | && val & ~((1 << pi->pcfg.num_events) - 1)) { | ||
1443 | pl330->dmac_tbd.reset_dmac = true; | ||
1444 | dev_err(pi->dev, "%s:%d Unexpected!\n", __func__, __LINE__); | ||
1445 | ret = 1; | ||
1446 | goto updt_exit; | ||
1447 | } | ||
1448 | |||
1449 | for (ev = 0; ev < pi->pcfg.num_events; ev++) { | ||
1450 | if (val & (1 << ev)) { /* Event occured */ | ||
1451 | struct pl330_thread *thrd; | ||
1452 | u32 inten = readl(regs + INTEN); | ||
1453 | int active; | ||
1454 | |||
1455 | /* Clear the event */ | ||
1456 | if (inten & (1 << ev)) | ||
1457 | writel(1 << ev, regs + INTCLR); | ||
1458 | |||
1459 | ret = 1; | ||
1460 | |||
1461 | id = pl330->events[ev]; | ||
1462 | |||
1463 | thrd = &pl330->channels[id]; | ||
1464 | |||
1465 | active = _thrd_active(thrd); | ||
1466 | if (!active) /* Aborted */ | ||
1467 | continue; | ||
1468 | |||
1469 | active -= 1; | ||
1470 | |||
1471 | rqdone = &thrd->req[active]; | ||
1472 | MARK_FREE(rqdone); | ||
1473 | |||
1474 | /* Get going again ASAP */ | ||
1475 | _start(thrd); | ||
1476 | |||
1477 | /* For now, just make a list of callbacks to be done */ | ||
1478 | list_add_tail(&rqdone->rqd, &pl330->req_done); | ||
1479 | } | ||
1480 | } | ||
1481 | |||
1482 | /* Now that we are in no hurry, do the callbacks */ | ||
1483 | while (!list_empty(&pl330->req_done)) { | ||
1484 | rqdone = container_of(pl330->req_done.next, | ||
1485 | struct _pl330_req, rqd); | ||
1486 | |||
1487 | list_del_init(&rqdone->rqd); | ||
1488 | |||
1489 | spin_unlock_irqrestore(&pl330->lock, flags); | ||
1490 | _callback(rqdone->r, PL330_ERR_NONE); | ||
1491 | spin_lock_irqsave(&pl330->lock, flags); | ||
1492 | } | ||
1493 | |||
1494 | updt_exit: | ||
1495 | spin_unlock_irqrestore(&pl330->lock, flags); | ||
1496 | |||
1497 | if (pl330->dmac_tbd.reset_dmac | ||
1498 | || pl330->dmac_tbd.reset_mngr | ||
1499 | || pl330->dmac_tbd.reset_chan) { | ||
1500 | ret = 1; | ||
1501 | tasklet_schedule(&pl330->tasks); | ||
1502 | } | ||
1503 | |||
1504 | return ret; | ||
1505 | } | ||
1506 | EXPORT_SYMBOL(pl330_update); | ||
1507 | |||
1508 | int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op) | ||
1509 | { | ||
1510 | struct pl330_thread *thrd = ch_id; | ||
1511 | struct pl330_dmac *pl330; | ||
1512 | unsigned long flags; | ||
1513 | int ret = 0, active; | ||
1514 | |||
1515 | if (!thrd || thrd->free || thrd->dmac->state == DYING) | ||
1516 | return -EINVAL; | ||
1517 | |||
1518 | pl330 = thrd->dmac; | ||
1519 | |||
1520 | spin_lock_irqsave(&pl330->lock, flags); | ||
1521 | |||
1522 | switch (op) { | ||
1523 | case PL330_OP_FLUSH: | ||
1524 | /* Make sure the channel is stopped */ | ||
1525 | _stop(thrd); | ||
1526 | |||
1527 | thrd->req[0].r = NULL; | ||
1528 | thrd->req[1].r = NULL; | ||
1529 | MARK_FREE(&thrd->req[0]); | ||
1530 | MARK_FREE(&thrd->req[1]); | ||
1531 | break; | ||
1532 | |||
1533 | case PL330_OP_ABORT: | ||
1534 | active = _thrd_active(thrd); | ||
1535 | |||
1536 | /* Make sure the channel is stopped */ | ||
1537 | _stop(thrd); | ||
1538 | |||
1539 | /* ABORT is only for the active req */ | ||
1540 | if (!active) | ||
1541 | break; | ||
1542 | |||
1543 | active--; | ||
1544 | |||
1545 | thrd->req[active].r = NULL; | ||
1546 | MARK_FREE(&thrd->req[active]); | ||
1547 | |||
1548 | /* Start the next */ | ||
1549 | case PL330_OP_START: | ||
1550 | if (!_start(thrd)) | ||
1551 | ret = -EIO; | ||
1552 | break; | ||
1553 | |||
1554 | default: | ||
1555 | ret = -EINVAL; | ||
1556 | } | ||
1557 | |||
1558 | spin_unlock_irqrestore(&pl330->lock, flags); | ||
1559 | return ret; | ||
1560 | } | ||
1561 | EXPORT_SYMBOL(pl330_chan_ctrl); | ||
1562 | |||
1563 | int pl330_chan_status(void *ch_id, struct pl330_chanstatus *pstatus) | ||
1564 | { | ||
1565 | struct pl330_thread *thrd = ch_id; | ||
1566 | struct pl330_dmac *pl330; | ||
1567 | struct pl330_info *pi; | ||
1568 | void __iomem *regs; | ||
1569 | int active; | ||
1570 | u32 val; | ||
1571 | |||
1572 | if (!pstatus || !thrd || thrd->free) | ||
1573 | return -EINVAL; | ||
1574 | |||
1575 | pl330 = thrd->dmac; | ||
1576 | pi = pl330->pinfo; | ||
1577 | regs = pi->base; | ||
1578 | |||
1579 | /* The client should remove the DMAC and add again */ | ||
1580 | if (pl330->state == DYING) | ||
1581 | pstatus->dmac_halted = true; | ||
1582 | else | ||
1583 | pstatus->dmac_halted = false; | ||
1584 | |||
1585 | val = readl(regs + FSC); | ||
1586 | if (val & (1 << thrd->id)) | ||
1587 | pstatus->faulting = true; | ||
1588 | else | ||
1589 | pstatus->faulting = false; | ||
1590 | |||
1591 | active = _thrd_active(thrd); | ||
1592 | |||
1593 | if (!active) { | ||
1594 | /* Indicate that the thread is not running */ | ||
1595 | pstatus->top_req = NULL; | ||
1596 | pstatus->wait_req = NULL; | ||
1597 | } else { | ||
1598 | active--; | ||
1599 | pstatus->top_req = thrd->req[active].r; | ||
1600 | pstatus->wait_req = !IS_FREE(&thrd->req[1 - active]) | ||
1601 | ? thrd->req[1 - active].r : NULL; | ||
1602 | } | ||
1603 | |||
1604 | pstatus->src_addr = readl(regs + SA(thrd->id)); | ||
1605 | pstatus->dst_addr = readl(regs + DA(thrd->id)); | ||
1606 | |||
1607 | return 0; | ||
1608 | } | ||
1609 | EXPORT_SYMBOL(pl330_chan_status); | ||
1610 | |||
1611 | /* Reserve an event */ | ||
1612 | static inline int _alloc_event(struct pl330_thread *thrd) | ||
1613 | { | ||
1614 | struct pl330_dmac *pl330 = thrd->dmac; | ||
1615 | struct pl330_info *pi = pl330->pinfo; | ||
1616 | int ev; | ||
1617 | |||
1618 | for (ev = 0; ev < pi->pcfg.num_events; ev++) | ||
1619 | if (pl330->events[ev] == -1) { | ||
1620 | pl330->events[ev] = thrd->id; | ||
1621 | return ev; | ||
1622 | } | ||
1623 | |||
1624 | return -1; | ||
1625 | } | ||
1626 | |||
1627 | /* Upon success, returns IdentityToken for the | ||
1628 | * allocated channel, NULL otherwise. | ||
1629 | */ | ||
1630 | void *pl330_request_channel(const struct pl330_info *pi) | ||
1631 | { | ||
1632 | struct pl330_thread *thrd = NULL; | ||
1633 | struct pl330_dmac *pl330; | ||
1634 | unsigned long flags; | ||
1635 | int chans, i; | ||
1636 | |||
1637 | if (!pi || !pi->pl330_data) | ||
1638 | return NULL; | ||
1639 | |||
1640 | pl330 = pi->pl330_data; | ||
1641 | |||
1642 | if (pl330->state == DYING) | ||
1643 | return NULL; | ||
1644 | |||
1645 | chans = pi->pcfg.num_chan; | ||
1646 | |||
1647 | spin_lock_irqsave(&pl330->lock, flags); | ||
1648 | |||
1649 | for (i = 0; i < chans; i++) { | ||
1650 | thrd = &pl330->channels[i]; | ||
1651 | if (thrd->free) { | ||
1652 | thrd->ev = _alloc_event(thrd); | ||
1653 | if (thrd->ev >= 0) { | ||
1654 | thrd->free = false; | ||
1655 | thrd->lstenq = 1; | ||
1656 | thrd->req[0].r = NULL; | ||
1657 | MARK_FREE(&thrd->req[0]); | ||
1658 | thrd->req[1].r = NULL; | ||
1659 | MARK_FREE(&thrd->req[1]); | ||
1660 | break; | ||
1661 | } | ||
1662 | } | ||
1663 | thrd = NULL; | ||
1664 | } | ||
1665 | |||
1666 | spin_unlock_irqrestore(&pl330->lock, flags); | ||
1667 | |||
1668 | return thrd; | ||
1669 | } | ||
1670 | EXPORT_SYMBOL(pl330_request_channel); | ||
1671 | |||
1672 | /* Release an event */ | ||
1673 | static inline void _free_event(struct pl330_thread *thrd, int ev) | ||
1674 | { | ||
1675 | struct pl330_dmac *pl330 = thrd->dmac; | ||
1676 | struct pl330_info *pi = pl330->pinfo; | ||
1677 | |||
1678 | /* If the event is valid and was held by the thread */ | ||
1679 | if (ev >= 0 && ev < pi->pcfg.num_events | ||
1680 | && pl330->events[ev] == thrd->id) | ||
1681 | pl330->events[ev] = -1; | ||
1682 | } | ||
1683 | |||
1684 | void pl330_release_channel(void *ch_id) | ||
1685 | { | ||
1686 | struct pl330_thread *thrd = ch_id; | ||
1687 | struct pl330_dmac *pl330; | ||
1688 | unsigned long flags; | ||
1689 | |||
1690 | if (!thrd || thrd->free) | ||
1691 | return; | ||
1692 | |||
1693 | _stop(thrd); | ||
1694 | |||
1695 | _callback(thrd->req[1 - thrd->lstenq].r, PL330_ERR_ABORT); | ||
1696 | _callback(thrd->req[thrd->lstenq].r, PL330_ERR_ABORT); | ||
1697 | |||
1698 | pl330 = thrd->dmac; | ||
1699 | |||
1700 | spin_lock_irqsave(&pl330->lock, flags); | ||
1701 | _free_event(thrd, thrd->ev); | ||
1702 | thrd->free = true; | ||
1703 | spin_unlock_irqrestore(&pl330->lock, flags); | ||
1704 | } | ||
1705 | EXPORT_SYMBOL(pl330_release_channel); | ||
1706 | |||
1707 | /* Initialize the structure for PL330 configuration, that can be used | ||
1708 | * by the client driver the make best use of the DMAC | ||
1709 | */ | ||
1710 | static void read_dmac_config(struct pl330_info *pi) | ||
1711 | { | ||
1712 | void __iomem *regs = pi->base; | ||
1713 | u32 val; | ||
1714 | |||
1715 | val = readl(regs + CRD) >> CRD_DATA_WIDTH_SHIFT; | ||
1716 | val &= CRD_DATA_WIDTH_MASK; | ||
1717 | pi->pcfg.data_bus_width = 8 * (1 << val); | ||
1718 | |||
1719 | val = readl(regs + CRD) >> CRD_DATA_BUFF_SHIFT; | ||
1720 | val &= CRD_DATA_BUFF_MASK; | ||
1721 | pi->pcfg.data_buf_dep = val + 1; | ||
1722 | |||
1723 | val = readl(regs + CR0) >> CR0_NUM_CHANS_SHIFT; | ||
1724 | val &= CR0_NUM_CHANS_MASK; | ||
1725 | val += 1; | ||
1726 | pi->pcfg.num_chan = val; | ||
1727 | |||
1728 | val = readl(regs + CR0); | ||
1729 | if (val & CR0_PERIPH_REQ_SET) { | ||
1730 | val = (val >> CR0_NUM_PERIPH_SHIFT) & CR0_NUM_PERIPH_MASK; | ||
1731 | val += 1; | ||
1732 | pi->pcfg.num_peri = val; | ||
1733 | pi->pcfg.peri_ns = readl(regs + CR4); | ||
1734 | } else { | ||
1735 | pi->pcfg.num_peri = 0; | ||
1736 | } | ||
1737 | |||
1738 | val = readl(regs + CR0); | ||
1739 | if (val & CR0_BOOT_MAN_NS) | ||
1740 | pi->pcfg.mode |= DMAC_MODE_NS; | ||
1741 | else | ||
1742 | pi->pcfg.mode &= ~DMAC_MODE_NS; | ||
1743 | |||
1744 | val = readl(regs + CR0) >> CR0_NUM_EVENTS_SHIFT; | ||
1745 | val &= CR0_NUM_EVENTS_MASK; | ||
1746 | val += 1; | ||
1747 | pi->pcfg.num_events = val; | ||
1748 | |||
1749 | pi->pcfg.irq_ns = readl(regs + CR3); | ||
1750 | |||
1751 | pi->pcfg.periph_id = get_id(pi, PERIPH_ID); | ||
1752 | pi->pcfg.pcell_id = get_id(pi, PCELL_ID); | ||
1753 | } | ||
1754 | |||
1755 | static inline void _reset_thread(struct pl330_thread *thrd) | ||
1756 | { | ||
1757 | struct pl330_dmac *pl330 = thrd->dmac; | ||
1758 | struct pl330_info *pi = pl330->pinfo; | ||
1759 | |||
1760 | thrd->req[0].mc_cpu = pl330->mcode_cpu | ||
1761 | + (thrd->id * pi->mcbufsz); | ||
1762 | thrd->req[0].mc_bus = pl330->mcode_bus | ||
1763 | + (thrd->id * pi->mcbufsz); | ||
1764 | thrd->req[0].r = NULL; | ||
1765 | MARK_FREE(&thrd->req[0]); | ||
1766 | |||
1767 | thrd->req[1].mc_cpu = thrd->req[0].mc_cpu | ||
1768 | + pi->mcbufsz / 2; | ||
1769 | thrd->req[1].mc_bus = thrd->req[0].mc_bus | ||
1770 | + pi->mcbufsz / 2; | ||
1771 | thrd->req[1].r = NULL; | ||
1772 | MARK_FREE(&thrd->req[1]); | ||
1773 | } | ||
1774 | |||
1775 | static int dmac_alloc_threads(struct pl330_dmac *pl330) | ||
1776 | { | ||
1777 | struct pl330_info *pi = pl330->pinfo; | ||
1778 | int chans = pi->pcfg.num_chan; | ||
1779 | struct pl330_thread *thrd; | ||
1780 | int i; | ||
1781 | |||
1782 | /* Allocate 1 Manager and 'chans' Channel threads */ | ||
1783 | pl330->channels = kzalloc((1 + chans) * sizeof(*thrd), | ||
1784 | GFP_KERNEL); | ||
1785 | if (!pl330->channels) | ||
1786 | return -ENOMEM; | ||
1787 | |||
1788 | /* Init Channel threads */ | ||
1789 | for (i = 0; i < chans; i++) { | ||
1790 | thrd = &pl330->channels[i]; | ||
1791 | thrd->id = i; | ||
1792 | thrd->dmac = pl330; | ||
1793 | _reset_thread(thrd); | ||
1794 | thrd->free = true; | ||
1795 | } | ||
1796 | |||
1797 | /* MANAGER is indexed at the end */ | ||
1798 | thrd = &pl330->channels[chans]; | ||
1799 | thrd->id = chans; | ||
1800 | thrd->dmac = pl330; | ||
1801 | thrd->free = false; | ||
1802 | pl330->manager = thrd; | ||
1803 | |||
1804 | return 0; | ||
1805 | } | ||
1806 | |||
1807 | static int dmac_alloc_resources(struct pl330_dmac *pl330) | ||
1808 | { | ||
1809 | struct pl330_info *pi = pl330->pinfo; | ||
1810 | int chans = pi->pcfg.num_chan; | ||
1811 | int ret; | ||
1812 | |||
1813 | /* | ||
1814 | * Alloc MicroCode buffer for 'chans' Channel threads. | ||
1815 | * A channel's buffer offset is (Channel_Id * MCODE_BUFF_PERCHAN) | ||
1816 | */ | ||
1817 | pl330->mcode_cpu = dma_alloc_coherent(pi->dev, | ||
1818 | chans * pi->mcbufsz, | ||
1819 | &pl330->mcode_bus, GFP_KERNEL); | ||
1820 | if (!pl330->mcode_cpu) { | ||
1821 | dev_err(pi->dev, "%s:%d Can't allocate memory!\n", | ||
1822 | __func__, __LINE__); | ||
1823 | return -ENOMEM; | ||
1824 | } | ||
1825 | |||
1826 | ret = dmac_alloc_threads(pl330); | ||
1827 | if (ret) { | ||
1828 | dev_err(pi->dev, "%s:%d Can't to create channels for DMAC!\n", | ||
1829 | __func__, __LINE__); | ||
1830 | dma_free_coherent(pi->dev, | ||
1831 | chans * pi->mcbufsz, | ||
1832 | pl330->mcode_cpu, pl330->mcode_bus); | ||
1833 | return ret; | ||
1834 | } | ||
1835 | |||
1836 | return 0; | ||
1837 | } | ||
1838 | |||
1839 | int pl330_add(struct pl330_info *pi) | ||
1840 | { | ||
1841 | struct pl330_dmac *pl330; | ||
1842 | void __iomem *regs; | ||
1843 | int i, ret; | ||
1844 | |||
1845 | if (!pi || !pi->dev) | ||
1846 | return -EINVAL; | ||
1847 | |||
1848 | /* If already added */ | ||
1849 | if (pi->pl330_data) | ||
1850 | return -EINVAL; | ||
1851 | |||
1852 | /* | ||
1853 | * If the SoC can perform reset on the DMAC, then do it | ||
1854 | * before reading its configuration. | ||
1855 | */ | ||
1856 | if (pi->dmac_reset) | ||
1857 | pi->dmac_reset(pi); | ||
1858 | |||
1859 | regs = pi->base; | ||
1860 | |||
1861 | /* Check if we can handle this DMAC */ | ||
1862 | if (get_id(pi, PERIPH_ID) != PERIPH_ID_VAL | ||
1863 | || get_id(pi, PCELL_ID) != PCELL_ID_VAL) { | ||
1864 | dev_err(pi->dev, "PERIPH_ID 0x%x, PCELL_ID 0x%x !\n", | ||
1865 | readl(regs + PERIPH_ID), readl(regs + PCELL_ID)); | ||
1866 | return -EINVAL; | ||
1867 | } | ||
1868 | |||
1869 | /* Read the configuration of the DMAC */ | ||
1870 | read_dmac_config(pi); | ||
1871 | |||
1872 | if (pi->pcfg.num_events == 0) { | ||
1873 | dev_err(pi->dev, "%s:%d Can't work without events!\n", | ||
1874 | __func__, __LINE__); | ||
1875 | return -EINVAL; | ||
1876 | } | ||
1877 | |||
1878 | pl330 = kzalloc(sizeof(*pl330), GFP_KERNEL); | ||
1879 | if (!pl330) { | ||
1880 | dev_err(pi->dev, "%s:%d Can't allocate memory!\n", | ||
1881 | __func__, __LINE__); | ||
1882 | return -ENOMEM; | ||
1883 | } | ||
1884 | |||
1885 | /* Assign the info structure and private data */ | ||
1886 | pl330->pinfo = pi; | ||
1887 | pi->pl330_data = pl330; | ||
1888 | |||
1889 | spin_lock_init(&pl330->lock); | ||
1890 | |||
1891 | INIT_LIST_HEAD(&pl330->req_done); | ||
1892 | |||
1893 | /* Use default MC buffer size if not provided */ | ||
1894 | if (!pi->mcbufsz) | ||
1895 | pi->mcbufsz = MCODE_BUFF_PER_REQ * 2; | ||
1896 | |||
1897 | /* Mark all events as free */ | ||
1898 | for (i = 0; i < pi->pcfg.num_events; i++) | ||
1899 | pl330->events[i] = -1; | ||
1900 | |||
1901 | /* Allocate resources needed by the DMAC */ | ||
1902 | ret = dmac_alloc_resources(pl330); | ||
1903 | if (ret) { | ||
1904 | dev_err(pi->dev, "Unable to create channels for DMAC\n"); | ||
1905 | kfree(pl330); | ||
1906 | return ret; | ||
1907 | } | ||
1908 | |||
1909 | tasklet_init(&pl330->tasks, pl330_dotask, (unsigned long) pl330); | ||
1910 | |||
1911 | pl330->state = INIT; | ||
1912 | |||
1913 | return 0; | ||
1914 | } | ||
1915 | EXPORT_SYMBOL(pl330_add); | ||
1916 | |||
1917 | static int dmac_free_threads(struct pl330_dmac *pl330) | ||
1918 | { | ||
1919 | struct pl330_info *pi = pl330->pinfo; | ||
1920 | int chans = pi->pcfg.num_chan; | ||
1921 | struct pl330_thread *thrd; | ||
1922 | int i; | ||
1923 | |||
1924 | /* Release Channel threads */ | ||
1925 | for (i = 0; i < chans; i++) { | ||
1926 | thrd = &pl330->channels[i]; | ||
1927 | pl330_release_channel((void *)thrd); | ||
1928 | } | ||
1929 | |||
1930 | /* Free memory */ | ||
1931 | kfree(pl330->channels); | ||
1932 | |||
1933 | return 0; | ||
1934 | } | ||
1935 | |||
1936 | static void dmac_free_resources(struct pl330_dmac *pl330) | ||
1937 | { | ||
1938 | struct pl330_info *pi = pl330->pinfo; | ||
1939 | int chans = pi->pcfg.num_chan; | ||
1940 | |||
1941 | dmac_free_threads(pl330); | ||
1942 | |||
1943 | dma_free_coherent(pi->dev, chans * pi->mcbufsz, | ||
1944 | pl330->mcode_cpu, pl330->mcode_bus); | ||
1945 | } | ||
1946 | |||
1947 | void pl330_del(struct pl330_info *pi) | ||
1948 | { | ||
1949 | struct pl330_dmac *pl330; | ||
1950 | |||
1951 | if (!pi || !pi->pl330_data) | ||
1952 | return; | ||
1953 | |||
1954 | pl330 = pi->pl330_data; | ||
1955 | |||
1956 | pl330->state = UNINIT; | ||
1957 | |||
1958 | tasklet_kill(&pl330->tasks); | ||
1959 | |||
1960 | /* Free DMAC resources */ | ||
1961 | dmac_free_resources(pl330); | ||
1962 | |||
1963 | kfree(pl330); | ||
1964 | pi->pl330_data = NULL; | ||
1965 | } | ||
1966 | EXPORT_SYMBOL(pl330_del); | ||
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index 1cf999ade4bc..ba65f6eedca6 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -266,13 +266,53 @@ static int vic_set_wake(unsigned int irq, unsigned int on) | |||
266 | #endif /* CONFIG_PM */ | 266 | #endif /* CONFIG_PM */ |
267 | 267 | ||
268 | static struct irq_chip vic_chip = { | 268 | static struct irq_chip vic_chip = { |
269 | .name = "VIC", | 269 | .name = "VIC", |
270 | .ack = vic_ack_irq, | 270 | .ack = vic_ack_irq, |
271 | .mask = vic_mask_irq, | 271 | .mask = vic_mask_irq, |
272 | .unmask = vic_unmask_irq, | 272 | .unmask = vic_unmask_irq, |
273 | .set_wake = vic_set_wake, | 273 | .set_wake = vic_set_wake, |
274 | }; | 274 | }; |
275 | 275 | ||
276 | static void __init vic_disable(void __iomem *base) | ||
277 | { | ||
278 | writel(0, base + VIC_INT_SELECT); | ||
279 | writel(0, base + VIC_INT_ENABLE); | ||
280 | writel(~0, base + VIC_INT_ENABLE_CLEAR); | ||
281 | writel(0, base + VIC_IRQ_STATUS); | ||
282 | writel(0, base + VIC_ITCR); | ||
283 | writel(~0, base + VIC_INT_SOFT_CLEAR); | ||
284 | } | ||
285 | |||
286 | static void __init vic_clear_interrupts(void __iomem *base) | ||
287 | { | ||
288 | unsigned int i; | ||
289 | |||
290 | writel(0, base + VIC_PL190_VECT_ADDR); | ||
291 | for (i = 0; i < 19; i++) { | ||
292 | unsigned int value; | ||
293 | |||
294 | value = readl(base + VIC_PL190_VECT_ADDR); | ||
295 | writel(value, base + VIC_PL190_VECT_ADDR); | ||
296 | } | ||
297 | } | ||
298 | |||
299 | static void __init vic_set_irq_sources(void __iomem *base, | ||
300 | unsigned int irq_start, u32 vic_sources) | ||
301 | { | ||
302 | unsigned int i; | ||
303 | |||
304 | for (i = 0; i < 32; i++) { | ||
305 | if (vic_sources & (1 << i)) { | ||
306 | unsigned int irq = irq_start + i; | ||
307 | |||
308 | set_irq_chip(irq, &vic_chip); | ||
309 | set_irq_chip_data(irq, base); | ||
310 | set_irq_handler(irq, handle_level_irq); | ||
311 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
312 | } | ||
313 | } | ||
314 | } | ||
315 | |||
276 | /* | 316 | /* |
277 | * The PL190 cell from ARM has been modified by ST to handle 64 interrupts. | 317 | * The PL190 cell from ARM has been modified by ST to handle 64 interrupts. |
278 | * The original cell has 32 interrupts, while the modified one has 64, | 318 | * The original cell has 32 interrupts, while the modified one has 64, |
@@ -287,13 +327,7 @@ static void __init vic_init_st(void __iomem *base, unsigned int irq_start, | |||
287 | int vic_2nd_block = ((unsigned long)base & ~PAGE_MASK) != 0; | 327 | int vic_2nd_block = ((unsigned long)base & ~PAGE_MASK) != 0; |
288 | 328 | ||
289 | /* Disable all interrupts initially. */ | 329 | /* Disable all interrupts initially. */ |
290 | 330 | vic_disable(base); | |
291 | writel(0, base + VIC_INT_SELECT); | ||
292 | writel(0, base + VIC_INT_ENABLE); | ||
293 | writel(~0, base + VIC_INT_ENABLE_CLEAR); | ||
294 | writel(0, base + VIC_IRQ_STATUS); | ||
295 | writel(0, base + VIC_ITCR); | ||
296 | writel(~0, base + VIC_INT_SOFT_CLEAR); | ||
297 | 331 | ||
298 | /* | 332 | /* |
299 | * Make sure we clear all existing interrupts. The vector registers | 333 | * Make sure we clear all existing interrupts. The vector registers |
@@ -302,13 +336,8 @@ static void __init vic_init_st(void __iomem *base, unsigned int irq_start, | |||
302 | * the second base address, which is 0x20 in the page | 336 | * the second base address, which is 0x20 in the page |
303 | */ | 337 | */ |
304 | if (vic_2nd_block) { | 338 | if (vic_2nd_block) { |
305 | writel(0, base + VIC_PL190_VECT_ADDR); | 339 | vic_clear_interrupts(base); |
306 | for (i = 0; i < 19; i++) { | ||
307 | unsigned int value; | ||
308 | 340 | ||
309 | value = readl(base + VIC_PL190_VECT_ADDR); | ||
310 | writel(value, base + VIC_PL190_VECT_ADDR); | ||
311 | } | ||
312 | /* ST has 16 vectors as well, but we don't enable them by now */ | 341 | /* ST has 16 vectors as well, but we don't enable them by now */ |
313 | for (i = 0; i < 16; i++) { | 342 | for (i = 0; i < 16; i++) { |
314 | void __iomem *reg = base + VIC_VECT_CNTL0 + (i * 4); | 343 | void __iomem *reg = base + VIC_VECT_CNTL0 + (i * 4); |
@@ -318,16 +347,7 @@ static void __init vic_init_st(void __iomem *base, unsigned int irq_start, | |||
318 | writel(32, base + VIC_PL190_DEF_VECT_ADDR); | 347 | writel(32, base + VIC_PL190_DEF_VECT_ADDR); |
319 | } | 348 | } |
320 | 349 | ||
321 | for (i = 0; i < 32; i++) { | 350 | vic_set_irq_sources(base, irq_start, vic_sources); |
322 | if (vic_sources & (1 << i)) { | ||
323 | unsigned int irq = irq_start + i; | ||
324 | |||
325 | set_irq_chip(irq, &vic_chip); | ||
326 | set_irq_chip_data(irq, base); | ||
327 | set_irq_handler(irq, handle_level_irq); | ||
328 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
329 | } | ||
330 | } | ||
331 | } | 351 | } |
332 | 352 | ||
333 | /** | 353 | /** |
@@ -365,37 +385,14 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
365 | } | 385 | } |
366 | 386 | ||
367 | /* Disable all interrupts initially. */ | 387 | /* Disable all interrupts initially. */ |
388 | vic_disable(base); | ||
368 | 389 | ||
369 | writel(0, base + VIC_INT_SELECT); | 390 | /* Make sure we clear all existing interrupts */ |
370 | writel(0, base + VIC_INT_ENABLE); | 391 | vic_clear_interrupts(base); |
371 | writel(~0, base + VIC_INT_ENABLE_CLEAR); | ||
372 | writel(0, base + VIC_IRQ_STATUS); | ||
373 | writel(0, base + VIC_ITCR); | ||
374 | writel(~0, base + VIC_INT_SOFT_CLEAR); | ||
375 | |||
376 | /* | ||
377 | * Make sure we clear all existing interrupts | ||
378 | */ | ||
379 | writel(0, base + VIC_PL190_VECT_ADDR); | ||
380 | for (i = 0; i < 19; i++) { | ||
381 | unsigned int value; | ||
382 | |||
383 | value = readl(base + VIC_PL190_VECT_ADDR); | ||
384 | writel(value, base + VIC_PL190_VECT_ADDR); | ||
385 | } | ||
386 | 392 | ||
387 | vic_init2(base); | 393 | vic_init2(base); |
388 | 394 | ||
389 | for (i = 0; i < 32; i++) { | 395 | vic_set_irq_sources(base, irq_start, vic_sources); |
390 | if (vic_sources & (1 << i)) { | ||
391 | unsigned int irq = irq_start + i; | ||
392 | |||
393 | set_irq_chip(irq, &vic_chip); | ||
394 | set_irq_chip_data(irq, base); | ||
395 | set_irq_handler(irq, handle_level_irq); | ||
396 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
397 | } | ||
398 | } | ||
399 | 396 | ||
400 | vic_pm_register(base, irq_start, resume_sources); | 397 | vic_pm_register(base, irq_start, resume_sources); |
401 | } | 398 | } |
diff --git a/arch/arm/configs/spear300_defconfig b/arch/arm/configs/spear300_defconfig new file mode 100644 index 000000000000..35e64d1cb750 --- /dev/null +++ b/arch/arm/configs/spear300_defconfig | |||
@@ -0,0 +1,773 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.32 | ||
4 | # Tue Mar 23 14:36:23 2010 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_GENERIC_HARDIRQS=y | ||
12 | CONFIG_STACKTRACE_SUPPORT=y | ||
13 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
14 | CONFIG_LOCKDEP_SUPPORT=y | ||
15 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
16 | CONFIG_HARDIRQS_SW_RESEND=y | ||
17 | CONFIG_GENERIC_IRQ_PROBE=y | ||
18 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
19 | CONFIG_GENERIC_HWEIGHT=y | ||
20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
21 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
22 | CONFIG_VECTORS_BASE=0xffff0000 | ||
23 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
24 | CONFIG_CONSTRUCTORS=y | ||
25 | |||
26 | # | ||
27 | # General setup | ||
28 | # | ||
29 | CONFIG_EXPERIMENTAL=y | ||
30 | CONFIG_BROKEN_ON_SMP=y | ||
31 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
32 | CONFIG_LOCALVERSION="" | ||
33 | CONFIG_LOCALVERSION_AUTO=y | ||
34 | CONFIG_SWAP=y | ||
35 | CONFIG_SYSVIPC=y | ||
36 | CONFIG_SYSVIPC_SYSCTL=y | ||
37 | CONFIG_BSD_PROCESS_ACCT=y | ||
38 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
39 | |||
40 | # | ||
41 | # RCU Subsystem | ||
42 | # | ||
43 | CONFIG_TREE_RCU=y | ||
44 | # CONFIG_TREE_PREEMPT_RCU is not set | ||
45 | # CONFIG_RCU_TRACE is not set | ||
46 | CONFIG_RCU_FANOUT=32 | ||
47 | # CONFIG_RCU_FANOUT_EXACT is not set | ||
48 | # CONFIG_TREE_RCU_TRACE is not set | ||
49 | # CONFIG_IKCONFIG is not set | ||
50 | CONFIG_LOG_BUF_SHIFT=17 | ||
51 | # CONFIG_GROUP_SCHED is not set | ||
52 | # CONFIG_CGROUPS is not set | ||
53 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
54 | # CONFIG_RELAY is not set | ||
55 | CONFIG_NAMESPACES=y | ||
56 | # CONFIG_UTS_NS is not set | ||
57 | # CONFIG_IPC_NS is not set | ||
58 | # CONFIG_USER_NS is not set | ||
59 | # CONFIG_PID_NS is not set | ||
60 | CONFIG_BLK_DEV_INITRD=y | ||
61 | CONFIG_INITRAMFS_SOURCE="" | ||
62 | CONFIG_RD_GZIP=y | ||
63 | CONFIG_RD_BZIP2=y | ||
64 | CONFIG_RD_LZMA=y | ||
65 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
66 | CONFIG_SYSCTL=y | ||
67 | CONFIG_ANON_INODES=y | ||
68 | # CONFIG_EMBEDDED is not set | ||
69 | CONFIG_UID16=y | ||
70 | CONFIG_SYSCTL_SYSCALL=y | ||
71 | CONFIG_KALLSYMS=y | ||
72 | # CONFIG_KALLSYMS_ALL is not set | ||
73 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
74 | CONFIG_HOTPLUG=y | ||
75 | CONFIG_PRINTK=y | ||
76 | CONFIG_BUG=y | ||
77 | CONFIG_ELF_CORE=y | ||
78 | CONFIG_BASE_FULL=y | ||
79 | CONFIG_FUTEX=y | ||
80 | CONFIG_EPOLL=y | ||
81 | CONFIG_SIGNALFD=y | ||
82 | CONFIG_TIMERFD=y | ||
83 | CONFIG_EVENTFD=y | ||
84 | CONFIG_SHMEM=y | ||
85 | CONFIG_AIO=y | ||
86 | |||
87 | # | ||
88 | # Kernel Performance Events And Counters | ||
89 | # | ||
90 | CONFIG_VM_EVENT_COUNTERS=y | ||
91 | CONFIG_SLUB_DEBUG=y | ||
92 | CONFIG_COMPAT_BRK=y | ||
93 | # CONFIG_SLAB is not set | ||
94 | CONFIG_SLUB=y | ||
95 | # CONFIG_SLOB is not set | ||
96 | # CONFIG_PROFILING is not set | ||
97 | CONFIG_HAVE_OPROFILE=y | ||
98 | # CONFIG_KPROBES is not set | ||
99 | CONFIG_HAVE_KPROBES=y | ||
100 | CONFIG_HAVE_KRETPROBES=y | ||
101 | CONFIG_HAVE_CLK=y | ||
102 | |||
103 | # | ||
104 | # GCOV-based kernel profiling | ||
105 | # | ||
106 | # CONFIG_GCOV_KERNEL is not set | ||
107 | # CONFIG_SLOW_WORK is not set | ||
108 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
109 | CONFIG_SLABINFO=y | ||
110 | CONFIG_RT_MUTEXES=y | ||
111 | CONFIG_BASE_SMALL=0 | ||
112 | CONFIG_MODULES=y | ||
113 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
114 | CONFIG_MODULE_UNLOAD=y | ||
115 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
116 | CONFIG_MODVERSIONS=y | ||
117 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
118 | CONFIG_BLOCK=y | ||
119 | CONFIG_LBDAF=y | ||
120 | CONFIG_BLK_DEV_BSG=y | ||
121 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
122 | |||
123 | # | ||
124 | # IO Schedulers | ||
125 | # | ||
126 | CONFIG_IOSCHED_NOOP=y | ||
127 | CONFIG_IOSCHED_AS=y | ||
128 | CONFIG_IOSCHED_DEADLINE=y | ||
129 | CONFIG_IOSCHED_CFQ=y | ||
130 | # CONFIG_DEFAULT_AS is not set | ||
131 | # CONFIG_DEFAULT_DEADLINE is not set | ||
132 | CONFIG_DEFAULT_CFQ=y | ||
133 | # CONFIG_DEFAULT_NOOP is not set | ||
134 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
135 | # CONFIG_FREEZER is not set | ||
136 | |||
137 | # | ||
138 | # System Type | ||
139 | # | ||
140 | CONFIG_MMU=y | ||
141 | # CONFIG_ARCH_AAEC2000 is not set | ||
142 | # CONFIG_ARCH_INTEGRATOR is not set | ||
143 | # CONFIG_ARCH_REALVIEW is not set | ||
144 | # CONFIG_ARCH_VERSATILE is not set | ||
145 | # CONFIG_ARCH_AT91 is not set | ||
146 | # CONFIG_ARCH_CLPS711X is not set | ||
147 | # CONFIG_ARCH_GEMINI is not set | ||
148 | # CONFIG_ARCH_EBSA110 is not set | ||
149 | # CONFIG_ARCH_EP93XX is not set | ||
150 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
151 | # CONFIG_ARCH_MXC is not set | ||
152 | # CONFIG_ARCH_STMP3XXX is not set | ||
153 | # CONFIG_ARCH_NETX is not set | ||
154 | # CONFIG_ARCH_H720X is not set | ||
155 | # CONFIG_ARCH_NOMADIK is not set | ||
156 | # CONFIG_ARCH_IOP13XX is not set | ||
157 | # CONFIG_ARCH_IOP32X is not set | ||
158 | # CONFIG_ARCH_IOP33X is not set | ||
159 | # CONFIG_ARCH_IXP23XX is not set | ||
160 | # CONFIG_ARCH_IXP2000 is not set | ||
161 | # CONFIG_ARCH_IXP4XX is not set | ||
162 | # CONFIG_ARCH_L7200 is not set | ||
163 | # CONFIG_ARCH_KIRKWOOD is not set | ||
164 | # CONFIG_ARCH_LOKI is not set | ||
165 | # CONFIG_ARCH_MV78XX0 is not set | ||
166 | # CONFIG_ARCH_ORION5X is not set | ||
167 | # CONFIG_ARCH_MMP is not set | ||
168 | # CONFIG_ARCH_KS8695 is not set | ||
169 | # CONFIG_ARCH_NS9XXX is not set | ||
170 | # CONFIG_ARCH_W90X900 is not set | ||
171 | # CONFIG_ARCH_PNX4008 is not set | ||
172 | # CONFIG_ARCH_PXA is not set | ||
173 | # CONFIG_ARCH_MSM is not set | ||
174 | # CONFIG_ARCH_RPC is not set | ||
175 | # CONFIG_ARCH_SA1100 is not set | ||
176 | # CONFIG_ARCH_S3C2410 is not set | ||
177 | # CONFIG_ARCH_S3C64XX is not set | ||
178 | # CONFIG_ARCH_S5PC1XX is not set | ||
179 | # CONFIG_ARCH_SHARK is not set | ||
180 | # CONFIG_ARCH_LH7A40X is not set | ||
181 | # CONFIG_ARCH_U300 is not set | ||
182 | # CONFIG_ARCH_DAVINCI is not set | ||
183 | # CONFIG_ARCH_OMAP is not set | ||
184 | # CONFIG_ARCH_BCMRING is not set | ||
185 | CONFIG_PLAT_SPEAR=y | ||
186 | CONFIG_ARCH_SPEAR3XX=y | ||
187 | # CONFIG_ARCH_SPEAR6XX is not set | ||
188 | CONFIG_MACH_SPEAR300=y | ||
189 | # CONFIG_MACH_SPEAR310 is not set | ||
190 | # CONFIG_MACH_SPEAR320 is not set | ||
191 | CONFIG_BOARD_SPEAR300_EVB=y | ||
192 | |||
193 | # | ||
194 | # Processor Type | ||
195 | # | ||
196 | CONFIG_CPU_32=y | ||
197 | CONFIG_CPU_ARM926T=y | ||
198 | CONFIG_CPU_32v5=y | ||
199 | CONFIG_CPU_ABRT_EV5TJ=y | ||
200 | CONFIG_CPU_PABRT_LEGACY=y | ||
201 | CONFIG_CPU_CACHE_VIVT=y | ||
202 | CONFIG_CPU_COPY_V4WB=y | ||
203 | CONFIG_CPU_TLB_V4WBI=y | ||
204 | CONFIG_CPU_CP15=y | ||
205 | CONFIG_CPU_CP15_MMU=y | ||
206 | |||
207 | # | ||
208 | # Processor Features | ||
209 | # | ||
210 | CONFIG_ARM_THUMB=y | ||
211 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
212 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
213 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
214 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
215 | CONFIG_ARM_L1_CACHE_SHIFT=5 | ||
216 | CONFIG_ARM_VIC=y | ||
217 | CONFIG_ARM_VIC_NR=2 | ||
218 | CONFIG_COMMON_CLKDEV=y | ||
219 | |||
220 | # | ||
221 | # Bus support | ||
222 | # | ||
223 | CONFIG_ARM_AMBA=y | ||
224 | # CONFIG_PCI_SYSCALL is not set | ||
225 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
226 | # CONFIG_PCCARD is not set | ||
227 | |||
228 | # | ||
229 | # Kernel Features | ||
230 | # | ||
231 | # CONFIG_NO_HZ is not set | ||
232 | # CONFIG_HIGH_RES_TIMERS is not set | ||
233 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
234 | CONFIG_VMSPLIT_3G=y | ||
235 | # CONFIG_VMSPLIT_2G is not set | ||
236 | # CONFIG_VMSPLIT_1G is not set | ||
237 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
238 | CONFIG_PREEMPT_NONE=y | ||
239 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
240 | # CONFIG_PREEMPT is not set | ||
241 | CONFIG_HZ=100 | ||
242 | # CONFIG_AEABI is not set | ||
243 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
244 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
245 | # CONFIG_HIGHMEM is not set | ||
246 | CONFIG_SELECT_MEMORY_MODEL=y | ||
247 | CONFIG_FLATMEM_MANUAL=y | ||
248 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
249 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
250 | CONFIG_FLATMEM=y | ||
251 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
252 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
253 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
254 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
255 | CONFIG_ZONE_DMA_FLAG=0 | ||
256 | CONFIG_VIRT_TO_BUS=y | ||
257 | CONFIG_HAVE_MLOCK=y | ||
258 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
259 | # CONFIG_KSM is not set | ||
260 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
261 | CONFIG_ALIGNMENT_TRAP=y | ||
262 | # CONFIG_UACCESS_WITH_MEMCPY is not set | ||
263 | |||
264 | # | ||
265 | # Boot options | ||
266 | # | ||
267 | CONFIG_ZBOOT_ROM_TEXT=0 | ||
268 | CONFIG_ZBOOT_ROM_BSS=0 | ||
269 | CONFIG_CMDLINE="" | ||
270 | # CONFIG_XIP_KERNEL is not set | ||
271 | # CONFIG_KEXEC is not set | ||
272 | |||
273 | # | ||
274 | # CPU Power Management | ||
275 | # | ||
276 | # CONFIG_CPU_IDLE is not set | ||
277 | |||
278 | # | ||
279 | # Floating point emulation | ||
280 | # | ||
281 | |||
282 | # | ||
283 | # At least one emulation must be selected | ||
284 | # | ||
285 | # CONFIG_FPE_NWFPE is not set | ||
286 | # CONFIG_FPE_FASTFPE is not set | ||
287 | # CONFIG_VFP is not set | ||
288 | |||
289 | # | ||
290 | # Userspace binary formats | ||
291 | # | ||
292 | CONFIG_BINFMT_ELF=y | ||
293 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
294 | CONFIG_HAVE_AOUT=y | ||
295 | # CONFIG_BINFMT_AOUT is not set | ||
296 | CONFIG_BINFMT_MISC=y | ||
297 | |||
298 | # | ||
299 | # Power management options | ||
300 | # | ||
301 | # CONFIG_PM is not set | ||
302 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
303 | # CONFIG_NET is not set | ||
304 | |||
305 | # | ||
306 | # Device Drivers | ||
307 | # | ||
308 | |||
309 | # | ||
310 | # Generic Driver Options | ||
311 | # | ||
312 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
313 | # CONFIG_DEVTMPFS is not set | ||
314 | CONFIG_STANDALONE=y | ||
315 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
316 | CONFIG_FW_LOADER=y | ||
317 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
318 | CONFIG_EXTRA_FIRMWARE="" | ||
319 | # CONFIG_DEBUG_DRIVER is not set | ||
320 | # CONFIG_DEBUG_DEVRES is not set | ||
321 | # CONFIG_SYS_HYPERVISOR is not set | ||
322 | # CONFIG_MTD is not set | ||
323 | # CONFIG_PARPORT is not set | ||
324 | CONFIG_BLK_DEV=y | ||
325 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
326 | # CONFIG_BLK_DEV_LOOP is not set | ||
327 | CONFIG_BLK_DEV_RAM=y | ||
328 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
329 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
330 | # CONFIG_BLK_DEV_XIP is not set | ||
331 | # CONFIG_CDROM_PKTCDVD is not set | ||
332 | CONFIG_MISC_DEVICES=y | ||
333 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
334 | # CONFIG_C2PORT is not set | ||
335 | |||
336 | # | ||
337 | # EEPROM support | ||
338 | # | ||
339 | # CONFIG_EEPROM_93CX6 is not set | ||
340 | CONFIG_HAVE_IDE=y | ||
341 | # CONFIG_IDE is not set | ||
342 | |||
343 | # | ||
344 | # SCSI device support | ||
345 | # | ||
346 | # CONFIG_RAID_ATTRS is not set | ||
347 | # CONFIG_SCSI is not set | ||
348 | # CONFIG_SCSI_DMA is not set | ||
349 | # CONFIG_SCSI_NETLINK is not set | ||
350 | # CONFIG_ATA is not set | ||
351 | # CONFIG_MD is not set | ||
352 | # CONFIG_PHONE is not set | ||
353 | |||
354 | # | ||
355 | # Input device support | ||
356 | # | ||
357 | CONFIG_INPUT=y | ||
358 | CONFIG_INPUT_FF_MEMLESS=y | ||
359 | # CONFIG_INPUT_POLLDEV is not set | ||
360 | |||
361 | # | ||
362 | # Userland interfaces | ||
363 | # | ||
364 | CONFIG_INPUT_MOUSEDEV=y | ||
365 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
366 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
367 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
368 | # CONFIG_INPUT_JOYDEV is not set | ||
369 | # CONFIG_INPUT_EVDEV is not set | ||
370 | # CONFIG_INPUT_EVBUG is not set | ||
371 | |||
372 | # | ||
373 | # Input Device Drivers | ||
374 | # | ||
375 | # CONFIG_INPUT_KEYBOARD is not set | ||
376 | # CONFIG_INPUT_MOUSE is not set | ||
377 | # CONFIG_INPUT_JOYSTICK is not set | ||
378 | # CONFIG_INPUT_TABLET is not set | ||
379 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
380 | # CONFIG_INPUT_MISC is not set | ||
381 | |||
382 | # | ||
383 | # Hardware I/O ports | ||
384 | # | ||
385 | CONFIG_SERIO=y | ||
386 | CONFIG_SERIO_SERPORT=y | ||
387 | # CONFIG_SERIO_AMBAKMI is not set | ||
388 | # CONFIG_SERIO_RAW is not set | ||
389 | # CONFIG_GAMEPORT is not set | ||
390 | |||
391 | # | ||
392 | # Character devices | ||
393 | # | ||
394 | CONFIG_VT=y | ||
395 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
396 | CONFIG_VT_CONSOLE=y | ||
397 | CONFIG_HW_CONSOLE=y | ||
398 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
399 | CONFIG_DEVKMEM=y | ||
400 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
401 | |||
402 | # | ||
403 | # Serial drivers | ||
404 | # | ||
405 | # CONFIG_SERIAL_8250 is not set | ||
406 | |||
407 | # | ||
408 | # Non-8250 serial port support | ||
409 | # | ||
410 | # CONFIG_SERIAL_AMBA_PL010 is not set | ||
411 | CONFIG_SERIAL_AMBA_PL011=y | ||
412 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | ||
413 | CONFIG_SERIAL_CORE=y | ||
414 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
415 | CONFIG_UNIX98_PTYS=y | ||
416 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
417 | # CONFIG_LEGACY_PTYS is not set | ||
418 | # CONFIG_IPMI_HANDLER is not set | ||
419 | # CONFIG_HW_RANDOM is not set | ||
420 | # CONFIG_R3964 is not set | ||
421 | CONFIG_RAW_DRIVER=y | ||
422 | CONFIG_MAX_RAW_DEVS=8192 | ||
423 | # CONFIG_TCG_TPM is not set | ||
424 | # CONFIG_I2C is not set | ||
425 | # CONFIG_SPI is not set | ||
426 | |||
427 | # | ||
428 | # PPS support | ||
429 | # | ||
430 | # CONFIG_PPS is not set | ||
431 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
432 | CONFIG_GPIOLIB=y | ||
433 | # CONFIG_DEBUG_GPIO is not set | ||
434 | CONFIG_GPIO_SYSFS=y | ||
435 | |||
436 | # | ||
437 | # Memory mapped GPIO expanders: | ||
438 | # | ||
439 | CONFIG_GPIO_PL061=y | ||
440 | |||
441 | # | ||
442 | # I2C GPIO expanders: | ||
443 | # | ||
444 | |||
445 | # | ||
446 | # PCI GPIO expanders: | ||
447 | # | ||
448 | |||
449 | # | ||
450 | # SPI GPIO expanders: | ||
451 | # | ||
452 | |||
453 | # | ||
454 | # AC97 GPIO expanders: | ||
455 | # | ||
456 | # CONFIG_W1 is not set | ||
457 | # CONFIG_POWER_SUPPLY is not set | ||
458 | # CONFIG_HWMON is not set | ||
459 | # CONFIG_THERMAL is not set | ||
460 | # CONFIG_WATCHDOG is not set | ||
461 | CONFIG_SSB_POSSIBLE=y | ||
462 | |||
463 | # | ||
464 | # Sonics Silicon Backplane | ||
465 | # | ||
466 | # CONFIG_SSB is not set | ||
467 | |||
468 | # | ||
469 | # Multifunction device drivers | ||
470 | # | ||
471 | # CONFIG_MFD_CORE is not set | ||
472 | # CONFIG_MFD_SM501 is not set | ||
473 | # CONFIG_MFD_ASIC3 is not set | ||
474 | # CONFIG_HTC_EGPIO is not set | ||
475 | # CONFIG_HTC_PASIC3 is not set | ||
476 | # CONFIG_MFD_TMIO is not set | ||
477 | # CONFIG_MFD_T7L66XB is not set | ||
478 | # CONFIG_MFD_TC6387XB is not set | ||
479 | # CONFIG_MFD_TC6393XB is not set | ||
480 | # CONFIG_REGULATOR is not set | ||
481 | # CONFIG_MEDIA_SUPPORT is not set | ||
482 | |||
483 | # | ||
484 | # Graphics support | ||
485 | # | ||
486 | # CONFIG_VGASTATE is not set | ||
487 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
488 | # CONFIG_FB is not set | ||
489 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
490 | |||
491 | # | ||
492 | # Display device support | ||
493 | # | ||
494 | # CONFIG_DISPLAY_SUPPORT is not set | ||
495 | |||
496 | # | ||
497 | # Console display driver support | ||
498 | # | ||
499 | # CONFIG_VGA_CONSOLE is not set | ||
500 | CONFIG_DUMMY_CONSOLE=y | ||
501 | # CONFIG_SOUND is not set | ||
502 | # CONFIG_HID_SUPPORT is not set | ||
503 | # CONFIG_USB_SUPPORT is not set | ||
504 | # CONFIG_MMC is not set | ||
505 | # CONFIG_MEMSTICK is not set | ||
506 | # CONFIG_NEW_LEDS is not set | ||
507 | # CONFIG_ACCESSIBILITY is not set | ||
508 | CONFIG_RTC_LIB=y | ||
509 | # CONFIG_RTC_CLASS is not set | ||
510 | # CONFIG_DMADEVICES is not set | ||
511 | # CONFIG_AUXDISPLAY is not set | ||
512 | # CONFIG_UIO is not set | ||
513 | |||
514 | # | ||
515 | # TI VLYNQ | ||
516 | # | ||
517 | # CONFIG_STAGING is not set | ||
518 | |||
519 | # | ||
520 | # File systems | ||
521 | # | ||
522 | CONFIG_EXT2_FS=y | ||
523 | CONFIG_EXT2_FS_XATTR=y | ||
524 | # CONFIG_EXT2_FS_POSIX_ACL is not set | ||
525 | CONFIG_EXT2_FS_SECURITY=y | ||
526 | # CONFIG_EXT2_FS_XIP is not set | ||
527 | CONFIG_EXT3_FS=y | ||
528 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | ||
529 | CONFIG_EXT3_FS_XATTR=y | ||
530 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
531 | CONFIG_EXT3_FS_SECURITY=y | ||
532 | # CONFIG_EXT4_FS is not set | ||
533 | CONFIG_JBD=y | ||
534 | # CONFIG_JBD_DEBUG is not set | ||
535 | CONFIG_FS_MBCACHE=y | ||
536 | # CONFIG_REISERFS_FS is not set | ||
537 | # CONFIG_JFS_FS is not set | ||
538 | # CONFIG_FS_POSIX_ACL is not set | ||
539 | # CONFIG_XFS_FS is not set | ||
540 | # CONFIG_GFS2_FS is not set | ||
541 | # CONFIG_BTRFS_FS is not set | ||
542 | # CONFIG_NILFS2_FS is not set | ||
543 | CONFIG_FILE_LOCKING=y | ||
544 | CONFIG_FSNOTIFY=y | ||
545 | CONFIG_DNOTIFY=y | ||
546 | # CONFIG_INOTIFY is not set | ||
547 | CONFIG_INOTIFY_USER=y | ||
548 | # CONFIG_QUOTA is not set | ||
549 | # CONFIG_AUTOFS_FS is not set | ||
550 | CONFIG_AUTOFS4_FS=m | ||
551 | # CONFIG_FUSE_FS is not set | ||
552 | |||
553 | # | ||
554 | # Caches | ||
555 | # | ||
556 | # CONFIG_FSCACHE is not set | ||
557 | |||
558 | # | ||
559 | # CD-ROM/DVD Filesystems | ||
560 | # | ||
561 | # CONFIG_ISO9660_FS is not set | ||
562 | # CONFIG_UDF_FS is not set | ||
563 | |||
564 | # | ||
565 | # DOS/FAT/NT Filesystems | ||
566 | # | ||
567 | CONFIG_FAT_FS=m | ||
568 | CONFIG_MSDOS_FS=m | ||
569 | CONFIG_VFAT_FS=m | ||
570 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
571 | CONFIG_FAT_DEFAULT_IOCHARSET="ascii" | ||
572 | # CONFIG_NTFS_FS is not set | ||
573 | |||
574 | # | ||
575 | # Pseudo filesystems | ||
576 | # | ||
577 | CONFIG_PROC_FS=y | ||
578 | CONFIG_PROC_SYSCTL=y | ||
579 | CONFIG_PROC_PAGE_MONITOR=y | ||
580 | CONFIG_SYSFS=y | ||
581 | CONFIG_TMPFS=y | ||
582 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
583 | # CONFIG_HUGETLB_PAGE is not set | ||
584 | # CONFIG_CONFIGFS_FS is not set | ||
585 | CONFIG_MISC_FILESYSTEMS=y | ||
586 | # CONFIG_ADFS_FS is not set | ||
587 | # CONFIG_AFFS_FS is not set | ||
588 | # CONFIG_HFS_FS is not set | ||
589 | # CONFIG_HFSPLUS_FS is not set | ||
590 | # CONFIG_BEFS_FS is not set | ||
591 | # CONFIG_BFS_FS is not set | ||
592 | # CONFIG_EFS_FS is not set | ||
593 | # CONFIG_SQUASHFS is not set | ||
594 | # CONFIG_VXFS_FS is not set | ||
595 | # CONFIG_MINIX_FS is not set | ||
596 | # CONFIG_OMFS_FS is not set | ||
597 | # CONFIG_HPFS_FS is not set | ||
598 | # CONFIG_QNX4FS_FS is not set | ||
599 | # CONFIG_ROMFS_FS is not set | ||
600 | # CONFIG_SYSV_FS is not set | ||
601 | # CONFIG_UFS_FS is not set | ||
602 | |||
603 | # | ||
604 | # Partition Types | ||
605 | # | ||
606 | CONFIG_PARTITION_ADVANCED=y | ||
607 | # CONFIG_ACORN_PARTITION is not set | ||
608 | # CONFIG_OSF_PARTITION is not set | ||
609 | # CONFIG_AMIGA_PARTITION is not set | ||
610 | # CONFIG_ATARI_PARTITION is not set | ||
611 | # CONFIG_MAC_PARTITION is not set | ||
612 | CONFIG_MSDOS_PARTITION=y | ||
613 | # CONFIG_BSD_DISKLABEL is not set | ||
614 | # CONFIG_MINIX_SUBPARTITION is not set | ||
615 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
616 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
617 | # CONFIG_LDM_PARTITION is not set | ||
618 | # CONFIG_SGI_PARTITION is not set | ||
619 | # CONFIG_ULTRIX_PARTITION is not set | ||
620 | # CONFIG_SUN_PARTITION is not set | ||
621 | # CONFIG_KARMA_PARTITION is not set | ||
622 | # CONFIG_EFI_PARTITION is not set | ||
623 | # CONFIG_SYSV68_PARTITION is not set | ||
624 | CONFIG_NLS=y | ||
625 | CONFIG_NLS_DEFAULT="utf8" | ||
626 | CONFIG_NLS_CODEPAGE_437=y | ||
627 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
628 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
629 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
630 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
631 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
632 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
633 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
634 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
635 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
636 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
637 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
638 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
639 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
640 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
641 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
642 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
643 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
644 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
645 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
646 | # CONFIG_NLS_ISO8859_8 is not set | ||
647 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
648 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
649 | CONFIG_NLS_ASCII=m | ||
650 | # CONFIG_NLS_ISO8859_1 is not set | ||
651 | # CONFIG_NLS_ISO8859_2 is not set | ||
652 | # CONFIG_NLS_ISO8859_3 is not set | ||
653 | # CONFIG_NLS_ISO8859_4 is not set | ||
654 | # CONFIG_NLS_ISO8859_5 is not set | ||
655 | # CONFIG_NLS_ISO8859_6 is not set | ||
656 | # CONFIG_NLS_ISO8859_7 is not set | ||
657 | # CONFIG_NLS_ISO8859_9 is not set | ||
658 | # CONFIG_NLS_ISO8859_13 is not set | ||
659 | # CONFIG_NLS_ISO8859_14 is not set | ||
660 | # CONFIG_NLS_ISO8859_15 is not set | ||
661 | # CONFIG_NLS_KOI8_R is not set | ||
662 | # CONFIG_NLS_KOI8_U is not set | ||
663 | # CONFIG_NLS_UTF8 is not set | ||
664 | |||
665 | # | ||
666 | # Kernel hacking | ||
667 | # | ||
668 | # CONFIG_PRINTK_TIME is not set | ||
669 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
670 | CONFIG_ENABLE_MUST_CHECK=y | ||
671 | CONFIG_FRAME_WARN=1024 | ||
672 | CONFIG_MAGIC_SYSRQ=y | ||
673 | # CONFIG_STRIP_ASM_SYMS is not set | ||
674 | # CONFIG_UNUSED_SYMBOLS is not set | ||
675 | CONFIG_DEBUG_FS=y | ||
676 | # CONFIG_HEADERS_CHECK is not set | ||
677 | CONFIG_DEBUG_KERNEL=y | ||
678 | # CONFIG_DEBUG_SHIRQ is not set | ||
679 | CONFIG_DETECT_SOFTLOCKUP=y | ||
680 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
681 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
682 | CONFIG_DETECT_HUNG_TASK=y | ||
683 | # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set | ||
684 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 | ||
685 | CONFIG_SCHED_DEBUG=y | ||
686 | # CONFIG_SCHEDSTATS is not set | ||
687 | # CONFIG_TIMER_STATS is not set | ||
688 | # CONFIG_DEBUG_OBJECTS is not set | ||
689 | # CONFIG_SLUB_DEBUG_ON is not set | ||
690 | # CONFIG_SLUB_STATS is not set | ||
691 | # CONFIG_DEBUG_KMEMLEAK is not set | ||
692 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
693 | # CONFIG_RT_MUTEX_TESTER is not set | ||
694 | CONFIG_DEBUG_SPINLOCK=y | ||
695 | # CONFIG_DEBUG_MUTEXES is not set | ||
696 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
697 | # CONFIG_PROVE_LOCKING is not set | ||
698 | # CONFIG_LOCK_STAT is not set | ||
699 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
700 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
701 | # CONFIG_DEBUG_KOBJECT is not set | ||
702 | CONFIG_DEBUG_BUGVERBOSE=y | ||
703 | CONFIG_DEBUG_INFO=y | ||
704 | # CONFIG_DEBUG_VM is not set | ||
705 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
706 | CONFIG_DEBUG_MEMORY_INIT=y | ||
707 | # CONFIG_DEBUG_LIST is not set | ||
708 | # CONFIG_DEBUG_SG is not set | ||
709 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
710 | # CONFIG_DEBUG_CREDENTIALS is not set | ||
711 | CONFIG_FRAME_POINTER=y | ||
712 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
713 | # CONFIG_RCU_TORTURE_TEST is not set | ||
714 | CONFIG_RCU_CPU_STALL_DETECTOR=y | ||
715 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
716 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
717 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | ||
718 | # CONFIG_FAULT_INJECTION is not set | ||
719 | # CONFIG_LATENCYTOP is not set | ||
720 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
721 | # CONFIG_PAGE_POISONING is not set | ||
722 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
723 | CONFIG_TRACING_SUPPORT=y | ||
724 | CONFIG_FTRACE=y | ||
725 | # CONFIG_FUNCTION_TRACER is not set | ||
726 | # CONFIG_IRQSOFF_TRACER is not set | ||
727 | # CONFIG_SCHED_TRACER is not set | ||
728 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set | ||
729 | # CONFIG_BOOT_TRACER is not set | ||
730 | CONFIG_BRANCH_PROFILE_NONE=y | ||
731 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
732 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
733 | # CONFIG_STACK_TRACER is not set | ||
734 | # CONFIG_KMEMTRACE is not set | ||
735 | # CONFIG_WORKQUEUE_TRACER is not set | ||
736 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
737 | # CONFIG_DYNAMIC_DEBUG is not set | ||
738 | # CONFIG_SAMPLES is not set | ||
739 | CONFIG_HAVE_ARCH_KGDB=y | ||
740 | # CONFIG_KGDB is not set | ||
741 | # CONFIG_DEBUG_USER is not set | ||
742 | # CONFIG_DEBUG_ERRORS is not set | ||
743 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
744 | # CONFIG_DEBUG_LL is not set | ||
745 | |||
746 | # | ||
747 | # Security options | ||
748 | # | ||
749 | # CONFIG_KEYS is not set | ||
750 | # CONFIG_SECURITY is not set | ||
751 | # CONFIG_SECURITYFS is not set | ||
752 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
753 | # CONFIG_CRYPTO is not set | ||
754 | # CONFIG_BINARY_PRINTF is not set | ||
755 | |||
756 | # | ||
757 | # Library routines | ||
758 | # | ||
759 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
760 | # CONFIG_CRC_CCITT is not set | ||
761 | # CONFIG_CRC16 is not set | ||
762 | # CONFIG_CRC_T10DIF is not set | ||
763 | # CONFIG_CRC_ITU_T is not set | ||
764 | # CONFIG_CRC32 is not set | ||
765 | # CONFIG_CRC7 is not set | ||
766 | # CONFIG_LIBCRC32C is not set | ||
767 | CONFIG_ZLIB_INFLATE=y | ||
768 | CONFIG_DECOMPRESS_GZIP=y | ||
769 | CONFIG_DECOMPRESS_BZIP2=y | ||
770 | CONFIG_DECOMPRESS_LZMA=y | ||
771 | CONFIG_HAS_IOMEM=y | ||
772 | CONFIG_HAS_IOPORT=y | ||
773 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/spear310_defconfig b/arch/arm/configs/spear310_defconfig new file mode 100644 index 000000000000..cbbfd290bba8 --- /dev/null +++ b/arch/arm/configs/spear310_defconfig | |||
@@ -0,0 +1,775 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.32 | ||
4 | # Tue Mar 23 14:37:01 2010 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_GENERIC_HARDIRQS=y | ||
12 | CONFIG_STACKTRACE_SUPPORT=y | ||
13 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
14 | CONFIG_LOCKDEP_SUPPORT=y | ||
15 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
16 | CONFIG_HARDIRQS_SW_RESEND=y | ||
17 | CONFIG_GENERIC_IRQ_PROBE=y | ||
18 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
19 | CONFIG_GENERIC_HWEIGHT=y | ||
20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
21 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
22 | CONFIG_VECTORS_BASE=0xffff0000 | ||
23 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
24 | CONFIG_CONSTRUCTORS=y | ||
25 | |||
26 | # | ||
27 | # General setup | ||
28 | # | ||
29 | CONFIG_EXPERIMENTAL=y | ||
30 | CONFIG_BROKEN_ON_SMP=y | ||
31 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
32 | CONFIG_LOCALVERSION="" | ||
33 | CONFIG_LOCALVERSION_AUTO=y | ||
34 | CONFIG_SWAP=y | ||
35 | CONFIG_SYSVIPC=y | ||
36 | CONFIG_SYSVIPC_SYSCTL=y | ||
37 | CONFIG_BSD_PROCESS_ACCT=y | ||
38 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
39 | |||
40 | # | ||
41 | # RCU Subsystem | ||
42 | # | ||
43 | CONFIG_TREE_RCU=y | ||
44 | # CONFIG_TREE_PREEMPT_RCU is not set | ||
45 | # CONFIG_RCU_TRACE is not set | ||
46 | CONFIG_RCU_FANOUT=32 | ||
47 | # CONFIG_RCU_FANOUT_EXACT is not set | ||
48 | # CONFIG_TREE_RCU_TRACE is not set | ||
49 | # CONFIG_IKCONFIG is not set | ||
50 | CONFIG_LOG_BUF_SHIFT=17 | ||
51 | # CONFIG_GROUP_SCHED is not set | ||
52 | # CONFIG_CGROUPS is not set | ||
53 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
54 | # CONFIG_RELAY is not set | ||
55 | CONFIG_NAMESPACES=y | ||
56 | # CONFIG_UTS_NS is not set | ||
57 | # CONFIG_IPC_NS is not set | ||
58 | # CONFIG_USER_NS is not set | ||
59 | # CONFIG_PID_NS is not set | ||
60 | CONFIG_BLK_DEV_INITRD=y | ||
61 | CONFIG_INITRAMFS_SOURCE="" | ||
62 | CONFIG_RD_GZIP=y | ||
63 | CONFIG_RD_BZIP2=y | ||
64 | CONFIG_RD_LZMA=y | ||
65 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
66 | CONFIG_SYSCTL=y | ||
67 | CONFIG_ANON_INODES=y | ||
68 | # CONFIG_EMBEDDED is not set | ||
69 | CONFIG_UID16=y | ||
70 | CONFIG_SYSCTL_SYSCALL=y | ||
71 | CONFIG_KALLSYMS=y | ||
72 | # CONFIG_KALLSYMS_ALL is not set | ||
73 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
74 | CONFIG_HOTPLUG=y | ||
75 | CONFIG_PRINTK=y | ||
76 | CONFIG_BUG=y | ||
77 | CONFIG_ELF_CORE=y | ||
78 | CONFIG_BASE_FULL=y | ||
79 | CONFIG_FUTEX=y | ||
80 | CONFIG_EPOLL=y | ||
81 | CONFIG_SIGNALFD=y | ||
82 | CONFIG_TIMERFD=y | ||
83 | CONFIG_EVENTFD=y | ||
84 | CONFIG_SHMEM=y | ||
85 | CONFIG_AIO=y | ||
86 | |||
87 | # | ||
88 | # Kernel Performance Events And Counters | ||
89 | # | ||
90 | CONFIG_VM_EVENT_COUNTERS=y | ||
91 | CONFIG_SLUB_DEBUG=y | ||
92 | CONFIG_COMPAT_BRK=y | ||
93 | # CONFIG_SLAB is not set | ||
94 | CONFIG_SLUB=y | ||
95 | # CONFIG_SLOB is not set | ||
96 | # CONFIG_PROFILING is not set | ||
97 | CONFIG_HAVE_OPROFILE=y | ||
98 | # CONFIG_KPROBES is not set | ||
99 | CONFIG_HAVE_KPROBES=y | ||
100 | CONFIG_HAVE_KRETPROBES=y | ||
101 | CONFIG_HAVE_CLK=y | ||
102 | |||
103 | # | ||
104 | # GCOV-based kernel profiling | ||
105 | # | ||
106 | # CONFIG_GCOV_KERNEL is not set | ||
107 | # CONFIG_SLOW_WORK is not set | ||
108 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
109 | CONFIG_SLABINFO=y | ||
110 | CONFIG_RT_MUTEXES=y | ||
111 | CONFIG_BASE_SMALL=0 | ||
112 | CONFIG_MODULES=y | ||
113 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
114 | CONFIG_MODULE_UNLOAD=y | ||
115 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
116 | CONFIG_MODVERSIONS=y | ||
117 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
118 | CONFIG_BLOCK=y | ||
119 | CONFIG_LBDAF=y | ||
120 | CONFIG_BLK_DEV_BSG=y | ||
121 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
122 | |||
123 | # | ||
124 | # IO Schedulers | ||
125 | # | ||
126 | CONFIG_IOSCHED_NOOP=y | ||
127 | CONFIG_IOSCHED_AS=y | ||
128 | CONFIG_IOSCHED_DEADLINE=y | ||
129 | CONFIG_IOSCHED_CFQ=y | ||
130 | # CONFIG_DEFAULT_AS is not set | ||
131 | # CONFIG_DEFAULT_DEADLINE is not set | ||
132 | CONFIG_DEFAULT_CFQ=y | ||
133 | # CONFIG_DEFAULT_NOOP is not set | ||
134 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
135 | # CONFIG_FREEZER is not set | ||
136 | |||
137 | # | ||
138 | # System Type | ||
139 | # | ||
140 | CONFIG_MMU=y | ||
141 | # CONFIG_ARCH_AAEC2000 is not set | ||
142 | # CONFIG_ARCH_INTEGRATOR is not set | ||
143 | # CONFIG_ARCH_REALVIEW is not set | ||
144 | # CONFIG_ARCH_VERSATILE is not set | ||
145 | # CONFIG_ARCH_AT91 is not set | ||
146 | # CONFIG_ARCH_CLPS711X is not set | ||
147 | # CONFIG_ARCH_GEMINI is not set | ||
148 | # CONFIG_ARCH_EBSA110 is not set | ||
149 | # CONFIG_ARCH_EP93XX is not set | ||
150 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
151 | # CONFIG_ARCH_MXC is not set | ||
152 | # CONFIG_ARCH_STMP3XXX is not set | ||
153 | # CONFIG_ARCH_NETX is not set | ||
154 | # CONFIG_ARCH_H720X is not set | ||
155 | # CONFIG_ARCH_NOMADIK is not set | ||
156 | # CONFIG_ARCH_IOP13XX is not set | ||
157 | # CONFIG_ARCH_IOP32X is not set | ||
158 | # CONFIG_ARCH_IOP33X is not set | ||
159 | # CONFIG_ARCH_IXP23XX is not set | ||
160 | # CONFIG_ARCH_IXP2000 is not set | ||
161 | # CONFIG_ARCH_IXP4XX is not set | ||
162 | # CONFIG_ARCH_L7200 is not set | ||
163 | # CONFIG_ARCH_KIRKWOOD is not set | ||
164 | # CONFIG_ARCH_LOKI is not set | ||
165 | # CONFIG_ARCH_MV78XX0 is not set | ||
166 | # CONFIG_ARCH_ORION5X is not set | ||
167 | # CONFIG_ARCH_MMP is not set | ||
168 | # CONFIG_ARCH_KS8695 is not set | ||
169 | # CONFIG_ARCH_NS9XXX is not set | ||
170 | # CONFIG_ARCH_W90X900 is not set | ||
171 | # CONFIG_ARCH_PNX4008 is not set | ||
172 | # CONFIG_ARCH_PXA is not set | ||
173 | # CONFIG_ARCH_MSM is not set | ||
174 | # CONFIG_ARCH_RPC is not set | ||
175 | # CONFIG_ARCH_SA1100 is not set | ||
176 | # CONFIG_ARCH_S3C2410 is not set | ||
177 | # CONFIG_ARCH_S3C64XX is not set | ||
178 | # CONFIG_ARCH_S5PC1XX is not set | ||
179 | # CONFIG_ARCH_SHARK is not set | ||
180 | # CONFIG_ARCH_LH7A40X is not set | ||
181 | # CONFIG_ARCH_U300 is not set | ||
182 | # CONFIG_ARCH_DAVINCI is not set | ||
183 | # CONFIG_ARCH_OMAP is not set | ||
184 | # CONFIG_ARCH_BCMRING is not set | ||
185 | CONFIG_PLAT_SPEAR=y | ||
186 | CONFIG_ARCH_SPEAR3XX=y | ||
187 | # CONFIG_ARCH_SPEAR6XX is not set | ||
188 | # CONFIG_MACH_SPEAR300 is not set | ||
189 | CONFIG_MACH_SPEAR310=y | ||
190 | # CONFIG_MACH_SPEAR320 is not set | ||
191 | # CONFIG_BOARD_SPEAR300_EVB is not set | ||
192 | CONFIG_BOARD_SPEAR310_EVB=y | ||
193 | |||
194 | # | ||
195 | # Processor Type | ||
196 | # | ||
197 | CONFIG_CPU_32=y | ||
198 | CONFIG_CPU_ARM926T=y | ||
199 | CONFIG_CPU_32v5=y | ||
200 | CONFIG_CPU_ABRT_EV5TJ=y | ||
201 | CONFIG_CPU_PABRT_LEGACY=y | ||
202 | CONFIG_CPU_CACHE_VIVT=y | ||
203 | CONFIG_CPU_COPY_V4WB=y | ||
204 | CONFIG_CPU_TLB_V4WBI=y | ||
205 | CONFIG_CPU_CP15=y | ||
206 | CONFIG_CPU_CP15_MMU=y | ||
207 | |||
208 | # | ||
209 | # Processor Features | ||
210 | # | ||
211 | CONFIG_ARM_THUMB=y | ||
212 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
213 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
214 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
215 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
216 | CONFIG_ARM_L1_CACHE_SHIFT=5 | ||
217 | CONFIG_ARM_VIC=y | ||
218 | CONFIG_ARM_VIC_NR=2 | ||
219 | CONFIG_COMMON_CLKDEV=y | ||
220 | |||
221 | # | ||
222 | # Bus support | ||
223 | # | ||
224 | CONFIG_ARM_AMBA=y | ||
225 | # CONFIG_PCI_SYSCALL is not set | ||
226 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
227 | # CONFIG_PCCARD is not set | ||
228 | |||
229 | # | ||
230 | # Kernel Features | ||
231 | # | ||
232 | # CONFIG_NO_HZ is not set | ||
233 | # CONFIG_HIGH_RES_TIMERS is not set | ||
234 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
235 | CONFIG_VMSPLIT_3G=y | ||
236 | # CONFIG_VMSPLIT_2G is not set | ||
237 | # CONFIG_VMSPLIT_1G is not set | ||
238 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
239 | CONFIG_PREEMPT_NONE=y | ||
240 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
241 | # CONFIG_PREEMPT is not set | ||
242 | CONFIG_HZ=100 | ||
243 | # CONFIG_AEABI is not set | ||
244 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
245 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
246 | # CONFIG_HIGHMEM is not set | ||
247 | CONFIG_SELECT_MEMORY_MODEL=y | ||
248 | CONFIG_FLATMEM_MANUAL=y | ||
249 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
250 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
251 | CONFIG_FLATMEM=y | ||
252 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
253 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
254 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
255 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
256 | CONFIG_ZONE_DMA_FLAG=0 | ||
257 | CONFIG_VIRT_TO_BUS=y | ||
258 | CONFIG_HAVE_MLOCK=y | ||
259 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
260 | # CONFIG_KSM is not set | ||
261 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
262 | CONFIG_ALIGNMENT_TRAP=y | ||
263 | # CONFIG_UACCESS_WITH_MEMCPY is not set | ||
264 | |||
265 | # | ||
266 | # Boot options | ||
267 | # | ||
268 | CONFIG_ZBOOT_ROM_TEXT=0 | ||
269 | CONFIG_ZBOOT_ROM_BSS=0 | ||
270 | CONFIG_CMDLINE="" | ||
271 | # CONFIG_XIP_KERNEL is not set | ||
272 | # CONFIG_KEXEC is not set | ||
273 | |||
274 | # | ||
275 | # CPU Power Management | ||
276 | # | ||
277 | # CONFIG_CPU_IDLE is not set | ||
278 | |||
279 | # | ||
280 | # Floating point emulation | ||
281 | # | ||
282 | |||
283 | # | ||
284 | # At least one emulation must be selected | ||
285 | # | ||
286 | # CONFIG_FPE_NWFPE is not set | ||
287 | # CONFIG_FPE_FASTFPE is not set | ||
288 | # CONFIG_VFP is not set | ||
289 | |||
290 | # | ||
291 | # Userspace binary formats | ||
292 | # | ||
293 | CONFIG_BINFMT_ELF=y | ||
294 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
295 | CONFIG_HAVE_AOUT=y | ||
296 | # CONFIG_BINFMT_AOUT is not set | ||
297 | CONFIG_BINFMT_MISC=y | ||
298 | |||
299 | # | ||
300 | # Power management options | ||
301 | # | ||
302 | # CONFIG_PM is not set | ||
303 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
304 | # CONFIG_NET is not set | ||
305 | |||
306 | # | ||
307 | # Device Drivers | ||
308 | # | ||
309 | |||
310 | # | ||
311 | # Generic Driver Options | ||
312 | # | ||
313 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
314 | # CONFIG_DEVTMPFS is not set | ||
315 | CONFIG_STANDALONE=y | ||
316 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
317 | CONFIG_FW_LOADER=y | ||
318 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
319 | CONFIG_EXTRA_FIRMWARE="" | ||
320 | # CONFIG_DEBUG_DRIVER is not set | ||
321 | # CONFIG_DEBUG_DEVRES is not set | ||
322 | # CONFIG_SYS_HYPERVISOR is not set | ||
323 | # CONFIG_MTD is not set | ||
324 | # CONFIG_PARPORT is not set | ||
325 | CONFIG_BLK_DEV=y | ||
326 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
327 | # CONFIG_BLK_DEV_LOOP is not set | ||
328 | CONFIG_BLK_DEV_RAM=y | ||
329 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
330 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
331 | # CONFIG_BLK_DEV_XIP is not set | ||
332 | # CONFIG_CDROM_PKTCDVD is not set | ||
333 | # CONFIG_MG_DISK is not set | ||
334 | CONFIG_MISC_DEVICES=y | ||
335 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
336 | # CONFIG_C2PORT is not set | ||
337 | |||
338 | # | ||
339 | # EEPROM support | ||
340 | # | ||
341 | # CONFIG_EEPROM_93CX6 is not set | ||
342 | CONFIG_HAVE_IDE=y | ||
343 | # CONFIG_IDE is not set | ||
344 | |||
345 | # | ||
346 | # SCSI device support | ||
347 | # | ||
348 | # CONFIG_RAID_ATTRS is not set | ||
349 | # CONFIG_SCSI is not set | ||
350 | # CONFIG_SCSI_DMA is not set | ||
351 | # CONFIG_SCSI_NETLINK is not set | ||
352 | # CONFIG_ATA is not set | ||
353 | # CONFIG_MD is not set | ||
354 | # CONFIG_PHONE is not set | ||
355 | |||
356 | # | ||
357 | # Input device support | ||
358 | # | ||
359 | CONFIG_INPUT=y | ||
360 | CONFIG_INPUT_FF_MEMLESS=y | ||
361 | # CONFIG_INPUT_POLLDEV is not set | ||
362 | |||
363 | # | ||
364 | # Userland interfaces | ||
365 | # | ||
366 | CONFIG_INPUT_MOUSEDEV=y | ||
367 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
368 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
369 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
370 | # CONFIG_INPUT_JOYDEV is not set | ||
371 | # CONFIG_INPUT_EVDEV is not set | ||
372 | # CONFIG_INPUT_EVBUG is not set | ||
373 | |||
374 | # | ||
375 | # Input Device Drivers | ||
376 | # | ||
377 | # CONFIG_INPUT_KEYBOARD is not set | ||
378 | # CONFIG_INPUT_MOUSE is not set | ||
379 | # CONFIG_INPUT_JOYSTICK is not set | ||
380 | # CONFIG_INPUT_TABLET is not set | ||
381 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
382 | # CONFIG_INPUT_MISC is not set | ||
383 | |||
384 | # | ||
385 | # Hardware I/O ports | ||
386 | # | ||
387 | CONFIG_SERIO=y | ||
388 | CONFIG_SERIO_SERPORT=y | ||
389 | # CONFIG_SERIO_AMBAKMI is not set | ||
390 | # CONFIG_SERIO_RAW is not set | ||
391 | # CONFIG_GAMEPORT is not set | ||
392 | |||
393 | # | ||
394 | # Character devices | ||
395 | # | ||
396 | CONFIG_VT=y | ||
397 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
398 | CONFIG_VT_CONSOLE=y | ||
399 | CONFIG_HW_CONSOLE=y | ||
400 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
401 | CONFIG_DEVKMEM=y | ||
402 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
403 | |||
404 | # | ||
405 | # Serial drivers | ||
406 | # | ||
407 | # CONFIG_SERIAL_8250 is not set | ||
408 | |||
409 | # | ||
410 | # Non-8250 serial port support | ||
411 | # | ||
412 | # CONFIG_SERIAL_AMBA_PL010 is not set | ||
413 | CONFIG_SERIAL_AMBA_PL011=y | ||
414 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | ||
415 | CONFIG_SERIAL_CORE=y | ||
416 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
417 | CONFIG_UNIX98_PTYS=y | ||
418 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
419 | # CONFIG_LEGACY_PTYS is not set | ||
420 | # CONFIG_IPMI_HANDLER is not set | ||
421 | # CONFIG_HW_RANDOM is not set | ||
422 | # CONFIG_R3964 is not set | ||
423 | CONFIG_RAW_DRIVER=y | ||
424 | CONFIG_MAX_RAW_DEVS=8192 | ||
425 | # CONFIG_TCG_TPM is not set | ||
426 | # CONFIG_I2C is not set | ||
427 | # CONFIG_SPI is not set | ||
428 | |||
429 | # | ||
430 | # PPS support | ||
431 | # | ||
432 | # CONFIG_PPS is not set | ||
433 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
434 | CONFIG_GPIOLIB=y | ||
435 | # CONFIG_DEBUG_GPIO is not set | ||
436 | CONFIG_GPIO_SYSFS=y | ||
437 | |||
438 | # | ||
439 | # Memory mapped GPIO expanders: | ||
440 | # | ||
441 | CONFIG_GPIO_PL061=y | ||
442 | |||
443 | # | ||
444 | # I2C GPIO expanders: | ||
445 | # | ||
446 | |||
447 | # | ||
448 | # PCI GPIO expanders: | ||
449 | # | ||
450 | |||
451 | # | ||
452 | # SPI GPIO expanders: | ||
453 | # | ||
454 | |||
455 | # | ||
456 | # AC97 GPIO expanders: | ||
457 | # | ||
458 | # CONFIG_W1 is not set | ||
459 | # CONFIG_POWER_SUPPLY is not set | ||
460 | # CONFIG_HWMON is not set | ||
461 | # CONFIG_THERMAL is not set | ||
462 | # CONFIG_WATCHDOG is not set | ||
463 | CONFIG_SSB_POSSIBLE=y | ||
464 | |||
465 | # | ||
466 | # Sonics Silicon Backplane | ||
467 | # | ||
468 | # CONFIG_SSB is not set | ||
469 | |||
470 | # | ||
471 | # Multifunction device drivers | ||
472 | # | ||
473 | # CONFIG_MFD_CORE is not set | ||
474 | # CONFIG_MFD_SM501 is not set | ||
475 | # CONFIG_MFD_ASIC3 is not set | ||
476 | # CONFIG_HTC_EGPIO is not set | ||
477 | # CONFIG_HTC_PASIC3 is not set | ||
478 | # CONFIG_MFD_TMIO is not set | ||
479 | # CONFIG_MFD_T7L66XB is not set | ||
480 | # CONFIG_MFD_TC6387XB is not set | ||
481 | # CONFIG_MFD_TC6393XB is not set | ||
482 | # CONFIG_REGULATOR is not set | ||
483 | # CONFIG_MEDIA_SUPPORT is not set | ||
484 | |||
485 | # | ||
486 | # Graphics support | ||
487 | # | ||
488 | # CONFIG_VGASTATE is not set | ||
489 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
490 | # CONFIG_FB is not set | ||
491 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
492 | |||
493 | # | ||
494 | # Display device support | ||
495 | # | ||
496 | # CONFIG_DISPLAY_SUPPORT is not set | ||
497 | |||
498 | # | ||
499 | # Console display driver support | ||
500 | # | ||
501 | # CONFIG_VGA_CONSOLE is not set | ||
502 | CONFIG_DUMMY_CONSOLE=y | ||
503 | # CONFIG_SOUND is not set | ||
504 | # CONFIG_HID_SUPPORT is not set | ||
505 | # CONFIG_USB_SUPPORT is not set | ||
506 | # CONFIG_MMC is not set | ||
507 | # CONFIG_MEMSTICK is not set | ||
508 | # CONFIG_NEW_LEDS is not set | ||
509 | # CONFIG_ACCESSIBILITY is not set | ||
510 | CONFIG_RTC_LIB=y | ||
511 | # CONFIG_RTC_CLASS is not set | ||
512 | # CONFIG_DMADEVICES is not set | ||
513 | # CONFIG_AUXDISPLAY is not set | ||
514 | # CONFIG_UIO is not set | ||
515 | |||
516 | # | ||
517 | # TI VLYNQ | ||
518 | # | ||
519 | # CONFIG_STAGING is not set | ||
520 | |||
521 | # | ||
522 | # File systems | ||
523 | # | ||
524 | CONFIG_EXT2_FS=y | ||
525 | CONFIG_EXT2_FS_XATTR=y | ||
526 | # CONFIG_EXT2_FS_POSIX_ACL is not set | ||
527 | CONFIG_EXT2_FS_SECURITY=y | ||
528 | # CONFIG_EXT2_FS_XIP is not set | ||
529 | CONFIG_EXT3_FS=y | ||
530 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | ||
531 | CONFIG_EXT3_FS_XATTR=y | ||
532 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
533 | CONFIG_EXT3_FS_SECURITY=y | ||
534 | # CONFIG_EXT4_FS is not set | ||
535 | CONFIG_JBD=y | ||
536 | # CONFIG_JBD_DEBUG is not set | ||
537 | CONFIG_FS_MBCACHE=y | ||
538 | # CONFIG_REISERFS_FS is not set | ||
539 | # CONFIG_JFS_FS is not set | ||
540 | # CONFIG_FS_POSIX_ACL is not set | ||
541 | # CONFIG_XFS_FS is not set | ||
542 | # CONFIG_GFS2_FS is not set | ||
543 | # CONFIG_BTRFS_FS is not set | ||
544 | # CONFIG_NILFS2_FS is not set | ||
545 | CONFIG_FILE_LOCKING=y | ||
546 | CONFIG_FSNOTIFY=y | ||
547 | CONFIG_DNOTIFY=y | ||
548 | # CONFIG_INOTIFY is not set | ||
549 | CONFIG_INOTIFY_USER=y | ||
550 | # CONFIG_QUOTA is not set | ||
551 | # CONFIG_AUTOFS_FS is not set | ||
552 | CONFIG_AUTOFS4_FS=m | ||
553 | # CONFIG_FUSE_FS is not set | ||
554 | |||
555 | # | ||
556 | # Caches | ||
557 | # | ||
558 | # CONFIG_FSCACHE is not set | ||
559 | |||
560 | # | ||
561 | # CD-ROM/DVD Filesystems | ||
562 | # | ||
563 | # CONFIG_ISO9660_FS is not set | ||
564 | # CONFIG_UDF_FS is not set | ||
565 | |||
566 | # | ||
567 | # DOS/FAT/NT Filesystems | ||
568 | # | ||
569 | CONFIG_FAT_FS=m | ||
570 | CONFIG_MSDOS_FS=m | ||
571 | CONFIG_VFAT_FS=m | ||
572 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
573 | CONFIG_FAT_DEFAULT_IOCHARSET="ascii" | ||
574 | # CONFIG_NTFS_FS is not set | ||
575 | |||
576 | # | ||
577 | # Pseudo filesystems | ||
578 | # | ||
579 | CONFIG_PROC_FS=y | ||
580 | CONFIG_PROC_SYSCTL=y | ||
581 | CONFIG_PROC_PAGE_MONITOR=y | ||
582 | CONFIG_SYSFS=y | ||
583 | CONFIG_TMPFS=y | ||
584 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
585 | # CONFIG_HUGETLB_PAGE is not set | ||
586 | # CONFIG_CONFIGFS_FS is not set | ||
587 | CONFIG_MISC_FILESYSTEMS=y | ||
588 | # CONFIG_ADFS_FS is not set | ||
589 | # CONFIG_AFFS_FS is not set | ||
590 | # CONFIG_HFS_FS is not set | ||
591 | # CONFIG_HFSPLUS_FS is not set | ||
592 | # CONFIG_BEFS_FS is not set | ||
593 | # CONFIG_BFS_FS is not set | ||
594 | # CONFIG_EFS_FS is not set | ||
595 | # CONFIG_SQUASHFS is not set | ||
596 | # CONFIG_VXFS_FS is not set | ||
597 | # CONFIG_MINIX_FS is not set | ||
598 | # CONFIG_OMFS_FS is not set | ||
599 | # CONFIG_HPFS_FS is not set | ||
600 | # CONFIG_QNX4FS_FS is not set | ||
601 | # CONFIG_ROMFS_FS is not set | ||
602 | # CONFIG_SYSV_FS is not set | ||
603 | # CONFIG_UFS_FS is not set | ||
604 | |||
605 | # | ||
606 | # Partition Types | ||
607 | # | ||
608 | CONFIG_PARTITION_ADVANCED=y | ||
609 | # CONFIG_ACORN_PARTITION is not set | ||
610 | # CONFIG_OSF_PARTITION is not set | ||
611 | # CONFIG_AMIGA_PARTITION is not set | ||
612 | # CONFIG_ATARI_PARTITION is not set | ||
613 | # CONFIG_MAC_PARTITION is not set | ||
614 | CONFIG_MSDOS_PARTITION=y | ||
615 | # CONFIG_BSD_DISKLABEL is not set | ||
616 | # CONFIG_MINIX_SUBPARTITION is not set | ||
617 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
618 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
619 | # CONFIG_LDM_PARTITION is not set | ||
620 | # CONFIG_SGI_PARTITION is not set | ||
621 | # CONFIG_ULTRIX_PARTITION is not set | ||
622 | # CONFIG_SUN_PARTITION is not set | ||
623 | # CONFIG_KARMA_PARTITION is not set | ||
624 | # CONFIG_EFI_PARTITION is not set | ||
625 | # CONFIG_SYSV68_PARTITION is not set | ||
626 | CONFIG_NLS=y | ||
627 | CONFIG_NLS_DEFAULT="utf8" | ||
628 | CONFIG_NLS_CODEPAGE_437=y | ||
629 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
630 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
631 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
632 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
633 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
634 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
635 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
636 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
637 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
638 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
639 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
640 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
641 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
642 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
643 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
644 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
645 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
646 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
647 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
648 | # CONFIG_NLS_ISO8859_8 is not set | ||
649 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
650 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
651 | CONFIG_NLS_ASCII=m | ||
652 | # CONFIG_NLS_ISO8859_1 is not set | ||
653 | # CONFIG_NLS_ISO8859_2 is not set | ||
654 | # CONFIG_NLS_ISO8859_3 is not set | ||
655 | # CONFIG_NLS_ISO8859_4 is not set | ||
656 | # CONFIG_NLS_ISO8859_5 is not set | ||
657 | # CONFIG_NLS_ISO8859_6 is not set | ||
658 | # CONFIG_NLS_ISO8859_7 is not set | ||
659 | # CONFIG_NLS_ISO8859_9 is not set | ||
660 | # CONFIG_NLS_ISO8859_13 is not set | ||
661 | # CONFIG_NLS_ISO8859_14 is not set | ||
662 | # CONFIG_NLS_ISO8859_15 is not set | ||
663 | # CONFIG_NLS_KOI8_R is not set | ||
664 | # CONFIG_NLS_KOI8_U is not set | ||
665 | # CONFIG_NLS_UTF8 is not set | ||
666 | |||
667 | # | ||
668 | # Kernel hacking | ||
669 | # | ||
670 | # CONFIG_PRINTK_TIME is not set | ||
671 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
672 | CONFIG_ENABLE_MUST_CHECK=y | ||
673 | CONFIG_FRAME_WARN=1024 | ||
674 | CONFIG_MAGIC_SYSRQ=y | ||
675 | # CONFIG_STRIP_ASM_SYMS is not set | ||
676 | # CONFIG_UNUSED_SYMBOLS is not set | ||
677 | CONFIG_DEBUG_FS=y | ||
678 | # CONFIG_HEADERS_CHECK is not set | ||
679 | CONFIG_DEBUG_KERNEL=y | ||
680 | # CONFIG_DEBUG_SHIRQ is not set | ||
681 | CONFIG_DETECT_SOFTLOCKUP=y | ||
682 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
683 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
684 | CONFIG_DETECT_HUNG_TASK=y | ||
685 | # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set | ||
686 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 | ||
687 | CONFIG_SCHED_DEBUG=y | ||
688 | # CONFIG_SCHEDSTATS is not set | ||
689 | # CONFIG_TIMER_STATS is not set | ||
690 | # CONFIG_DEBUG_OBJECTS is not set | ||
691 | # CONFIG_SLUB_DEBUG_ON is not set | ||
692 | # CONFIG_SLUB_STATS is not set | ||
693 | # CONFIG_DEBUG_KMEMLEAK is not set | ||
694 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
695 | # CONFIG_RT_MUTEX_TESTER is not set | ||
696 | CONFIG_DEBUG_SPINLOCK=y | ||
697 | # CONFIG_DEBUG_MUTEXES is not set | ||
698 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
699 | # CONFIG_PROVE_LOCKING is not set | ||
700 | # CONFIG_LOCK_STAT is not set | ||
701 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
702 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
703 | # CONFIG_DEBUG_KOBJECT is not set | ||
704 | CONFIG_DEBUG_BUGVERBOSE=y | ||
705 | CONFIG_DEBUG_INFO=y | ||
706 | # CONFIG_DEBUG_VM is not set | ||
707 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
708 | CONFIG_DEBUG_MEMORY_INIT=y | ||
709 | # CONFIG_DEBUG_LIST is not set | ||
710 | # CONFIG_DEBUG_SG is not set | ||
711 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
712 | # CONFIG_DEBUG_CREDENTIALS is not set | ||
713 | CONFIG_FRAME_POINTER=y | ||
714 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
715 | # CONFIG_RCU_TORTURE_TEST is not set | ||
716 | CONFIG_RCU_CPU_STALL_DETECTOR=y | ||
717 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
718 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
719 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | ||
720 | # CONFIG_FAULT_INJECTION is not set | ||
721 | # CONFIG_LATENCYTOP is not set | ||
722 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
723 | # CONFIG_PAGE_POISONING is not set | ||
724 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
725 | CONFIG_TRACING_SUPPORT=y | ||
726 | CONFIG_FTRACE=y | ||
727 | # CONFIG_FUNCTION_TRACER is not set | ||
728 | # CONFIG_IRQSOFF_TRACER is not set | ||
729 | # CONFIG_SCHED_TRACER is not set | ||
730 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set | ||
731 | # CONFIG_BOOT_TRACER is not set | ||
732 | CONFIG_BRANCH_PROFILE_NONE=y | ||
733 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
734 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
735 | # CONFIG_STACK_TRACER is not set | ||
736 | # CONFIG_KMEMTRACE is not set | ||
737 | # CONFIG_WORKQUEUE_TRACER is not set | ||
738 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
739 | # CONFIG_DYNAMIC_DEBUG is not set | ||
740 | # CONFIG_SAMPLES is not set | ||
741 | CONFIG_HAVE_ARCH_KGDB=y | ||
742 | # CONFIG_KGDB is not set | ||
743 | # CONFIG_DEBUG_USER is not set | ||
744 | # CONFIG_DEBUG_ERRORS is not set | ||
745 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
746 | # CONFIG_DEBUG_LL is not set | ||
747 | |||
748 | # | ||
749 | # Security options | ||
750 | # | ||
751 | # CONFIG_KEYS is not set | ||
752 | # CONFIG_SECURITY is not set | ||
753 | # CONFIG_SECURITYFS is not set | ||
754 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
755 | # CONFIG_CRYPTO is not set | ||
756 | # CONFIG_BINARY_PRINTF is not set | ||
757 | |||
758 | # | ||
759 | # Library routines | ||
760 | # | ||
761 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
762 | # CONFIG_CRC_CCITT is not set | ||
763 | # CONFIG_CRC16 is not set | ||
764 | # CONFIG_CRC_T10DIF is not set | ||
765 | # CONFIG_CRC_ITU_T is not set | ||
766 | # CONFIG_CRC32 is not set | ||
767 | # CONFIG_CRC7 is not set | ||
768 | # CONFIG_LIBCRC32C is not set | ||
769 | CONFIG_ZLIB_INFLATE=y | ||
770 | CONFIG_DECOMPRESS_GZIP=y | ||
771 | CONFIG_DECOMPRESS_BZIP2=y | ||
772 | CONFIG_DECOMPRESS_LZMA=y | ||
773 | CONFIG_HAS_IOMEM=y | ||
774 | CONFIG_HAS_IOPORT=y | ||
775 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/spear320_defconfig b/arch/arm/configs/spear320_defconfig new file mode 100644 index 000000000000..2ae3c110a21a --- /dev/null +++ b/arch/arm/configs/spear320_defconfig | |||
@@ -0,0 +1,775 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.32 | ||
4 | # Tue Mar 23 14:37:12 2010 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_GENERIC_HARDIRQS=y | ||
12 | CONFIG_STACKTRACE_SUPPORT=y | ||
13 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
14 | CONFIG_LOCKDEP_SUPPORT=y | ||
15 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
16 | CONFIG_HARDIRQS_SW_RESEND=y | ||
17 | CONFIG_GENERIC_IRQ_PROBE=y | ||
18 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
19 | CONFIG_GENERIC_HWEIGHT=y | ||
20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
21 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
22 | CONFIG_VECTORS_BASE=0xffff0000 | ||
23 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
24 | CONFIG_CONSTRUCTORS=y | ||
25 | |||
26 | # | ||
27 | # General setup | ||
28 | # | ||
29 | CONFIG_EXPERIMENTAL=y | ||
30 | CONFIG_BROKEN_ON_SMP=y | ||
31 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
32 | CONFIG_LOCALVERSION="" | ||
33 | CONFIG_LOCALVERSION_AUTO=y | ||
34 | CONFIG_SWAP=y | ||
35 | CONFIG_SYSVIPC=y | ||
36 | CONFIG_SYSVIPC_SYSCTL=y | ||
37 | CONFIG_BSD_PROCESS_ACCT=y | ||
38 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
39 | |||
40 | # | ||
41 | # RCU Subsystem | ||
42 | # | ||
43 | CONFIG_TREE_RCU=y | ||
44 | # CONFIG_TREE_PREEMPT_RCU is not set | ||
45 | # CONFIG_RCU_TRACE is not set | ||
46 | CONFIG_RCU_FANOUT=32 | ||
47 | # CONFIG_RCU_FANOUT_EXACT is not set | ||
48 | # CONFIG_TREE_RCU_TRACE is not set | ||
49 | # CONFIG_IKCONFIG is not set | ||
50 | CONFIG_LOG_BUF_SHIFT=17 | ||
51 | # CONFIG_GROUP_SCHED is not set | ||
52 | # CONFIG_CGROUPS is not set | ||
53 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
54 | # CONFIG_RELAY is not set | ||
55 | CONFIG_NAMESPACES=y | ||
56 | # CONFIG_UTS_NS is not set | ||
57 | # CONFIG_IPC_NS is not set | ||
58 | # CONFIG_USER_NS is not set | ||
59 | # CONFIG_PID_NS is not set | ||
60 | CONFIG_BLK_DEV_INITRD=y | ||
61 | CONFIG_INITRAMFS_SOURCE="" | ||
62 | CONFIG_RD_GZIP=y | ||
63 | CONFIG_RD_BZIP2=y | ||
64 | CONFIG_RD_LZMA=y | ||
65 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
66 | CONFIG_SYSCTL=y | ||
67 | CONFIG_ANON_INODES=y | ||
68 | # CONFIG_EMBEDDED is not set | ||
69 | CONFIG_UID16=y | ||
70 | CONFIG_SYSCTL_SYSCALL=y | ||
71 | CONFIG_KALLSYMS=y | ||
72 | # CONFIG_KALLSYMS_ALL is not set | ||
73 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
74 | CONFIG_HOTPLUG=y | ||
75 | CONFIG_PRINTK=y | ||
76 | CONFIG_BUG=y | ||
77 | CONFIG_ELF_CORE=y | ||
78 | CONFIG_BASE_FULL=y | ||
79 | CONFIG_FUTEX=y | ||
80 | CONFIG_EPOLL=y | ||
81 | CONFIG_SIGNALFD=y | ||
82 | CONFIG_TIMERFD=y | ||
83 | CONFIG_EVENTFD=y | ||
84 | CONFIG_SHMEM=y | ||
85 | CONFIG_AIO=y | ||
86 | |||
87 | # | ||
88 | # Kernel Performance Events And Counters | ||
89 | # | ||
90 | CONFIG_VM_EVENT_COUNTERS=y | ||
91 | CONFIG_SLUB_DEBUG=y | ||
92 | CONFIG_COMPAT_BRK=y | ||
93 | # CONFIG_SLAB is not set | ||
94 | CONFIG_SLUB=y | ||
95 | # CONFIG_SLOB is not set | ||
96 | # CONFIG_PROFILING is not set | ||
97 | CONFIG_HAVE_OPROFILE=y | ||
98 | # CONFIG_KPROBES is not set | ||
99 | CONFIG_HAVE_KPROBES=y | ||
100 | CONFIG_HAVE_KRETPROBES=y | ||
101 | CONFIG_HAVE_CLK=y | ||
102 | |||
103 | # | ||
104 | # GCOV-based kernel profiling | ||
105 | # | ||
106 | # CONFIG_GCOV_KERNEL is not set | ||
107 | # CONFIG_SLOW_WORK is not set | ||
108 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
109 | CONFIG_SLABINFO=y | ||
110 | CONFIG_RT_MUTEXES=y | ||
111 | CONFIG_BASE_SMALL=0 | ||
112 | CONFIG_MODULES=y | ||
113 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
114 | CONFIG_MODULE_UNLOAD=y | ||
115 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
116 | CONFIG_MODVERSIONS=y | ||
117 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
118 | CONFIG_BLOCK=y | ||
119 | CONFIG_LBDAF=y | ||
120 | CONFIG_BLK_DEV_BSG=y | ||
121 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
122 | |||
123 | # | ||
124 | # IO Schedulers | ||
125 | # | ||
126 | CONFIG_IOSCHED_NOOP=y | ||
127 | CONFIG_IOSCHED_AS=y | ||
128 | CONFIG_IOSCHED_DEADLINE=y | ||
129 | CONFIG_IOSCHED_CFQ=y | ||
130 | # CONFIG_DEFAULT_AS is not set | ||
131 | # CONFIG_DEFAULT_DEADLINE is not set | ||
132 | CONFIG_DEFAULT_CFQ=y | ||
133 | # CONFIG_DEFAULT_NOOP is not set | ||
134 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
135 | # CONFIG_FREEZER is not set | ||
136 | |||
137 | # | ||
138 | # System Type | ||
139 | # | ||
140 | CONFIG_MMU=y | ||
141 | # CONFIG_ARCH_AAEC2000 is not set | ||
142 | # CONFIG_ARCH_INTEGRATOR is not set | ||
143 | # CONFIG_ARCH_REALVIEW is not set | ||
144 | # CONFIG_ARCH_VERSATILE is not set | ||
145 | # CONFIG_ARCH_AT91 is not set | ||
146 | # CONFIG_ARCH_CLPS711X is not set | ||
147 | # CONFIG_ARCH_GEMINI is not set | ||
148 | # CONFIG_ARCH_EBSA110 is not set | ||
149 | # CONFIG_ARCH_EP93XX is not set | ||
150 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
151 | # CONFIG_ARCH_MXC is not set | ||
152 | # CONFIG_ARCH_STMP3XXX is not set | ||
153 | # CONFIG_ARCH_NETX is not set | ||
154 | # CONFIG_ARCH_H720X is not set | ||
155 | # CONFIG_ARCH_NOMADIK is not set | ||
156 | # CONFIG_ARCH_IOP13XX is not set | ||
157 | # CONFIG_ARCH_IOP32X is not set | ||
158 | # CONFIG_ARCH_IOP33X is not set | ||
159 | # CONFIG_ARCH_IXP23XX is not set | ||
160 | # CONFIG_ARCH_IXP2000 is not set | ||
161 | # CONFIG_ARCH_IXP4XX is not set | ||
162 | # CONFIG_ARCH_L7200 is not set | ||
163 | # CONFIG_ARCH_KIRKWOOD is not set | ||
164 | # CONFIG_ARCH_LOKI is not set | ||
165 | # CONFIG_ARCH_MV78XX0 is not set | ||
166 | # CONFIG_ARCH_ORION5X is not set | ||
167 | # CONFIG_ARCH_MMP is not set | ||
168 | # CONFIG_ARCH_KS8695 is not set | ||
169 | # CONFIG_ARCH_NS9XXX is not set | ||
170 | # CONFIG_ARCH_W90X900 is not set | ||
171 | # CONFIG_ARCH_PNX4008 is not set | ||
172 | # CONFIG_ARCH_PXA is not set | ||
173 | # CONFIG_ARCH_MSM is not set | ||
174 | # CONFIG_ARCH_RPC is not set | ||
175 | # CONFIG_ARCH_SA1100 is not set | ||
176 | # CONFIG_ARCH_S3C2410 is not set | ||
177 | # CONFIG_ARCH_S3C64XX is not set | ||
178 | # CONFIG_ARCH_S5PC1XX is not set | ||
179 | # CONFIG_ARCH_SHARK is not set | ||
180 | # CONFIG_ARCH_LH7A40X is not set | ||
181 | # CONFIG_ARCH_U300 is not set | ||
182 | # CONFIG_ARCH_DAVINCI is not set | ||
183 | # CONFIG_ARCH_OMAP is not set | ||
184 | # CONFIG_ARCH_BCMRING is not set | ||
185 | CONFIG_PLAT_SPEAR=y | ||
186 | CONFIG_ARCH_SPEAR3XX=y | ||
187 | # CONFIG_ARCH_SPEAR6XX is not set | ||
188 | # CONFIG_MACH_SPEAR300 is not set | ||
189 | # CONFIG_MACH_SPEAR310 is not set | ||
190 | CONFIG_MACH_SPEAR320=y | ||
191 | # CONFIG_BOARD_SPEAR300_EVB is not set | ||
192 | CONFIG_BOARD_SPEAR320_EVB=y | ||
193 | |||
194 | # | ||
195 | # Processor Type | ||
196 | # | ||
197 | CONFIG_CPU_32=y | ||
198 | CONFIG_CPU_ARM926T=y | ||
199 | CONFIG_CPU_32v5=y | ||
200 | CONFIG_CPU_ABRT_EV5TJ=y | ||
201 | CONFIG_CPU_PABRT_LEGACY=y | ||
202 | CONFIG_CPU_CACHE_VIVT=y | ||
203 | CONFIG_CPU_COPY_V4WB=y | ||
204 | CONFIG_CPU_TLB_V4WBI=y | ||
205 | CONFIG_CPU_CP15=y | ||
206 | CONFIG_CPU_CP15_MMU=y | ||
207 | |||
208 | # | ||
209 | # Processor Features | ||
210 | # | ||
211 | CONFIG_ARM_THUMB=y | ||
212 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
213 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
214 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
215 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
216 | CONFIG_ARM_L1_CACHE_SHIFT=5 | ||
217 | CONFIG_ARM_VIC=y | ||
218 | CONFIG_ARM_VIC_NR=2 | ||
219 | CONFIG_COMMON_CLKDEV=y | ||
220 | |||
221 | # | ||
222 | # Bus support | ||
223 | # | ||
224 | CONFIG_ARM_AMBA=y | ||
225 | # CONFIG_PCI_SYSCALL is not set | ||
226 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
227 | # CONFIG_PCCARD is not set | ||
228 | |||
229 | # | ||
230 | # Kernel Features | ||
231 | # | ||
232 | # CONFIG_NO_HZ is not set | ||
233 | # CONFIG_HIGH_RES_TIMERS is not set | ||
234 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
235 | CONFIG_VMSPLIT_3G=y | ||
236 | # CONFIG_VMSPLIT_2G is not set | ||
237 | # CONFIG_VMSPLIT_1G is not set | ||
238 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
239 | CONFIG_PREEMPT_NONE=y | ||
240 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
241 | # CONFIG_PREEMPT is not set | ||
242 | CONFIG_HZ=100 | ||
243 | # CONFIG_AEABI is not set | ||
244 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
245 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
246 | # CONFIG_HIGHMEM is not set | ||
247 | CONFIG_SELECT_MEMORY_MODEL=y | ||
248 | CONFIG_FLATMEM_MANUAL=y | ||
249 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
250 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
251 | CONFIG_FLATMEM=y | ||
252 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
253 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
254 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
255 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
256 | CONFIG_ZONE_DMA_FLAG=0 | ||
257 | CONFIG_VIRT_TO_BUS=y | ||
258 | CONFIG_HAVE_MLOCK=y | ||
259 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
260 | # CONFIG_KSM is not set | ||
261 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
262 | CONFIG_ALIGNMENT_TRAP=y | ||
263 | # CONFIG_UACCESS_WITH_MEMCPY is not set | ||
264 | |||
265 | # | ||
266 | # Boot options | ||
267 | # | ||
268 | CONFIG_ZBOOT_ROM_TEXT=0 | ||
269 | CONFIG_ZBOOT_ROM_BSS=0 | ||
270 | CONFIG_CMDLINE="" | ||
271 | # CONFIG_XIP_KERNEL is not set | ||
272 | # CONFIG_KEXEC is not set | ||
273 | |||
274 | # | ||
275 | # CPU Power Management | ||
276 | # | ||
277 | # CONFIG_CPU_IDLE is not set | ||
278 | |||
279 | # | ||
280 | # Floating point emulation | ||
281 | # | ||
282 | |||
283 | # | ||
284 | # At least one emulation must be selected | ||
285 | # | ||
286 | # CONFIG_FPE_NWFPE is not set | ||
287 | # CONFIG_FPE_FASTFPE is not set | ||
288 | # CONFIG_VFP is not set | ||
289 | |||
290 | # | ||
291 | # Userspace binary formats | ||
292 | # | ||
293 | CONFIG_BINFMT_ELF=y | ||
294 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
295 | CONFIG_HAVE_AOUT=y | ||
296 | # CONFIG_BINFMT_AOUT is not set | ||
297 | CONFIG_BINFMT_MISC=y | ||
298 | |||
299 | # | ||
300 | # Power management options | ||
301 | # | ||
302 | # CONFIG_PM is not set | ||
303 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
304 | # CONFIG_NET is not set | ||
305 | |||
306 | # | ||
307 | # Device Drivers | ||
308 | # | ||
309 | |||
310 | # | ||
311 | # Generic Driver Options | ||
312 | # | ||
313 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
314 | # CONFIG_DEVTMPFS is not set | ||
315 | CONFIG_STANDALONE=y | ||
316 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
317 | CONFIG_FW_LOADER=y | ||
318 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
319 | CONFIG_EXTRA_FIRMWARE="" | ||
320 | # CONFIG_DEBUG_DRIVER is not set | ||
321 | # CONFIG_DEBUG_DEVRES is not set | ||
322 | # CONFIG_SYS_HYPERVISOR is not set | ||
323 | # CONFIG_MTD is not set | ||
324 | # CONFIG_PARPORT is not set | ||
325 | CONFIG_BLK_DEV=y | ||
326 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
327 | # CONFIG_BLK_DEV_LOOP is not set | ||
328 | CONFIG_BLK_DEV_RAM=y | ||
329 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
330 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
331 | # CONFIG_BLK_DEV_XIP is not set | ||
332 | # CONFIG_CDROM_PKTCDVD is not set | ||
333 | # CONFIG_MG_DISK is not set | ||
334 | CONFIG_MISC_DEVICES=y | ||
335 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
336 | # CONFIG_C2PORT is not set | ||
337 | |||
338 | # | ||
339 | # EEPROM support | ||
340 | # | ||
341 | # CONFIG_EEPROM_93CX6 is not set | ||
342 | CONFIG_HAVE_IDE=y | ||
343 | # CONFIG_IDE is not set | ||
344 | |||
345 | # | ||
346 | # SCSI device support | ||
347 | # | ||
348 | # CONFIG_RAID_ATTRS is not set | ||
349 | # CONFIG_SCSI is not set | ||
350 | # CONFIG_SCSI_DMA is not set | ||
351 | # CONFIG_SCSI_NETLINK is not set | ||
352 | # CONFIG_ATA is not set | ||
353 | # CONFIG_MD is not set | ||
354 | # CONFIG_PHONE is not set | ||
355 | |||
356 | # | ||
357 | # Input device support | ||
358 | # | ||
359 | CONFIG_INPUT=y | ||
360 | CONFIG_INPUT_FF_MEMLESS=y | ||
361 | # CONFIG_INPUT_POLLDEV is not set | ||
362 | |||
363 | # | ||
364 | # Userland interfaces | ||
365 | # | ||
366 | CONFIG_INPUT_MOUSEDEV=y | ||
367 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
368 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
369 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
370 | # CONFIG_INPUT_JOYDEV is not set | ||
371 | # CONFIG_INPUT_EVDEV is not set | ||
372 | # CONFIG_INPUT_EVBUG is not set | ||
373 | |||
374 | # | ||
375 | # Input Device Drivers | ||
376 | # | ||
377 | # CONFIG_INPUT_KEYBOARD is not set | ||
378 | # CONFIG_INPUT_MOUSE is not set | ||
379 | # CONFIG_INPUT_JOYSTICK is not set | ||
380 | # CONFIG_INPUT_TABLET is not set | ||
381 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
382 | # CONFIG_INPUT_MISC is not set | ||
383 | |||
384 | # | ||
385 | # Hardware I/O ports | ||
386 | # | ||
387 | CONFIG_SERIO=y | ||
388 | CONFIG_SERIO_SERPORT=y | ||
389 | # CONFIG_SERIO_AMBAKMI is not set | ||
390 | # CONFIG_SERIO_RAW is not set | ||
391 | # CONFIG_GAMEPORT is not set | ||
392 | |||
393 | # | ||
394 | # Character devices | ||
395 | # | ||
396 | CONFIG_VT=y | ||
397 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
398 | CONFIG_VT_CONSOLE=y | ||
399 | CONFIG_HW_CONSOLE=y | ||
400 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
401 | CONFIG_DEVKMEM=y | ||
402 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
403 | |||
404 | # | ||
405 | # Serial drivers | ||
406 | # | ||
407 | # CONFIG_SERIAL_8250 is not set | ||
408 | |||
409 | # | ||
410 | # Non-8250 serial port support | ||
411 | # | ||
412 | # CONFIG_SERIAL_AMBA_PL010 is not set | ||
413 | CONFIG_SERIAL_AMBA_PL011=y | ||
414 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | ||
415 | CONFIG_SERIAL_CORE=y | ||
416 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
417 | CONFIG_UNIX98_PTYS=y | ||
418 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
419 | # CONFIG_LEGACY_PTYS is not set | ||
420 | # CONFIG_IPMI_HANDLER is not set | ||
421 | # CONFIG_HW_RANDOM is not set | ||
422 | # CONFIG_R3964 is not set | ||
423 | CONFIG_RAW_DRIVER=y | ||
424 | CONFIG_MAX_RAW_DEVS=8192 | ||
425 | # CONFIG_TCG_TPM is not set | ||
426 | # CONFIG_I2C is not set | ||
427 | # CONFIG_SPI is not set | ||
428 | |||
429 | # | ||
430 | # PPS support | ||
431 | # | ||
432 | # CONFIG_PPS is not set | ||
433 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
434 | CONFIG_GPIOLIB=y | ||
435 | # CONFIG_DEBUG_GPIO is not set | ||
436 | CONFIG_GPIO_SYSFS=y | ||
437 | |||
438 | # | ||
439 | # Memory mapped GPIO expanders: | ||
440 | # | ||
441 | CONFIG_GPIO_PL061=y | ||
442 | |||
443 | # | ||
444 | # I2C GPIO expanders: | ||
445 | # | ||
446 | |||
447 | # | ||
448 | # PCI GPIO expanders: | ||
449 | # | ||
450 | |||
451 | # | ||
452 | # SPI GPIO expanders: | ||
453 | # | ||
454 | |||
455 | # | ||
456 | # AC97 GPIO expanders: | ||
457 | # | ||
458 | # CONFIG_W1 is not set | ||
459 | # CONFIG_POWER_SUPPLY is not set | ||
460 | # CONFIG_HWMON is not set | ||
461 | # CONFIG_THERMAL is not set | ||
462 | # CONFIG_WATCHDOG is not set | ||
463 | CONFIG_SSB_POSSIBLE=y | ||
464 | |||
465 | # | ||
466 | # Sonics Silicon Backplane | ||
467 | # | ||
468 | # CONFIG_SSB is not set | ||
469 | |||
470 | # | ||
471 | # Multifunction device drivers | ||
472 | # | ||
473 | # CONFIG_MFD_CORE is not set | ||
474 | # CONFIG_MFD_SM501 is not set | ||
475 | # CONFIG_MFD_ASIC3 is not set | ||
476 | # CONFIG_HTC_EGPIO is not set | ||
477 | # CONFIG_HTC_PASIC3 is not set | ||
478 | # CONFIG_MFD_TMIO is not set | ||
479 | # CONFIG_MFD_T7L66XB is not set | ||
480 | # CONFIG_MFD_TC6387XB is not set | ||
481 | # CONFIG_MFD_TC6393XB is not set | ||
482 | # CONFIG_REGULATOR is not set | ||
483 | # CONFIG_MEDIA_SUPPORT is not set | ||
484 | |||
485 | # | ||
486 | # Graphics support | ||
487 | # | ||
488 | # CONFIG_VGASTATE is not set | ||
489 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
490 | # CONFIG_FB is not set | ||
491 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
492 | |||
493 | # | ||
494 | # Display device support | ||
495 | # | ||
496 | # CONFIG_DISPLAY_SUPPORT is not set | ||
497 | |||
498 | # | ||
499 | # Console display driver support | ||
500 | # | ||
501 | # CONFIG_VGA_CONSOLE is not set | ||
502 | CONFIG_DUMMY_CONSOLE=y | ||
503 | # CONFIG_SOUND is not set | ||
504 | # CONFIG_HID_SUPPORT is not set | ||
505 | # CONFIG_USB_SUPPORT is not set | ||
506 | # CONFIG_MMC is not set | ||
507 | # CONFIG_MEMSTICK is not set | ||
508 | # CONFIG_NEW_LEDS is not set | ||
509 | # CONFIG_ACCESSIBILITY is not set | ||
510 | CONFIG_RTC_LIB=y | ||
511 | # CONFIG_RTC_CLASS is not set | ||
512 | # CONFIG_DMADEVICES is not set | ||
513 | # CONFIG_AUXDISPLAY is not set | ||
514 | # CONFIG_UIO is not set | ||
515 | |||
516 | # | ||
517 | # TI VLYNQ | ||
518 | # | ||
519 | # CONFIG_STAGING is not set | ||
520 | |||
521 | # | ||
522 | # File systems | ||
523 | # | ||
524 | CONFIG_EXT2_FS=y | ||
525 | CONFIG_EXT2_FS_XATTR=y | ||
526 | # CONFIG_EXT2_FS_POSIX_ACL is not set | ||
527 | CONFIG_EXT2_FS_SECURITY=y | ||
528 | # CONFIG_EXT2_FS_XIP is not set | ||
529 | CONFIG_EXT3_FS=y | ||
530 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | ||
531 | CONFIG_EXT3_FS_XATTR=y | ||
532 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
533 | CONFIG_EXT3_FS_SECURITY=y | ||
534 | # CONFIG_EXT4_FS is not set | ||
535 | CONFIG_JBD=y | ||
536 | # CONFIG_JBD_DEBUG is not set | ||
537 | CONFIG_FS_MBCACHE=y | ||
538 | # CONFIG_REISERFS_FS is not set | ||
539 | # CONFIG_JFS_FS is not set | ||
540 | # CONFIG_FS_POSIX_ACL is not set | ||
541 | # CONFIG_XFS_FS is not set | ||
542 | # CONFIG_GFS2_FS is not set | ||
543 | # CONFIG_BTRFS_FS is not set | ||
544 | # CONFIG_NILFS2_FS is not set | ||
545 | CONFIG_FILE_LOCKING=y | ||
546 | CONFIG_FSNOTIFY=y | ||
547 | CONFIG_DNOTIFY=y | ||
548 | # CONFIG_INOTIFY is not set | ||
549 | CONFIG_INOTIFY_USER=y | ||
550 | # CONFIG_QUOTA is not set | ||
551 | # CONFIG_AUTOFS_FS is not set | ||
552 | CONFIG_AUTOFS4_FS=m | ||
553 | # CONFIG_FUSE_FS is not set | ||
554 | |||
555 | # | ||
556 | # Caches | ||
557 | # | ||
558 | # CONFIG_FSCACHE is not set | ||
559 | |||
560 | # | ||
561 | # CD-ROM/DVD Filesystems | ||
562 | # | ||
563 | # CONFIG_ISO9660_FS is not set | ||
564 | # CONFIG_UDF_FS is not set | ||
565 | |||
566 | # | ||
567 | # DOS/FAT/NT Filesystems | ||
568 | # | ||
569 | CONFIG_FAT_FS=m | ||
570 | CONFIG_MSDOS_FS=m | ||
571 | CONFIG_VFAT_FS=m | ||
572 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
573 | CONFIG_FAT_DEFAULT_IOCHARSET="ascii" | ||
574 | # CONFIG_NTFS_FS is not set | ||
575 | |||
576 | # | ||
577 | # Pseudo filesystems | ||
578 | # | ||
579 | CONFIG_PROC_FS=y | ||
580 | CONFIG_PROC_SYSCTL=y | ||
581 | CONFIG_PROC_PAGE_MONITOR=y | ||
582 | CONFIG_SYSFS=y | ||
583 | CONFIG_TMPFS=y | ||
584 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
585 | # CONFIG_HUGETLB_PAGE is not set | ||
586 | # CONFIG_CONFIGFS_FS is not set | ||
587 | CONFIG_MISC_FILESYSTEMS=y | ||
588 | # CONFIG_ADFS_FS is not set | ||
589 | # CONFIG_AFFS_FS is not set | ||
590 | # CONFIG_HFS_FS is not set | ||
591 | # CONFIG_HFSPLUS_FS is not set | ||
592 | # CONFIG_BEFS_FS is not set | ||
593 | # CONFIG_BFS_FS is not set | ||
594 | # CONFIG_EFS_FS is not set | ||
595 | # CONFIG_SQUASHFS is not set | ||
596 | # CONFIG_VXFS_FS is not set | ||
597 | # CONFIG_MINIX_FS is not set | ||
598 | # CONFIG_OMFS_FS is not set | ||
599 | # CONFIG_HPFS_FS is not set | ||
600 | # CONFIG_QNX4FS_FS is not set | ||
601 | # CONFIG_ROMFS_FS is not set | ||
602 | # CONFIG_SYSV_FS is not set | ||
603 | # CONFIG_UFS_FS is not set | ||
604 | |||
605 | # | ||
606 | # Partition Types | ||
607 | # | ||
608 | CONFIG_PARTITION_ADVANCED=y | ||
609 | # CONFIG_ACORN_PARTITION is not set | ||
610 | # CONFIG_OSF_PARTITION is not set | ||
611 | # CONFIG_AMIGA_PARTITION is not set | ||
612 | # CONFIG_ATARI_PARTITION is not set | ||
613 | # CONFIG_MAC_PARTITION is not set | ||
614 | CONFIG_MSDOS_PARTITION=y | ||
615 | # CONFIG_BSD_DISKLABEL is not set | ||
616 | # CONFIG_MINIX_SUBPARTITION is not set | ||
617 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
618 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
619 | # CONFIG_LDM_PARTITION is not set | ||
620 | # CONFIG_SGI_PARTITION is not set | ||
621 | # CONFIG_ULTRIX_PARTITION is not set | ||
622 | # CONFIG_SUN_PARTITION is not set | ||
623 | # CONFIG_KARMA_PARTITION is not set | ||
624 | # CONFIG_EFI_PARTITION is not set | ||
625 | # CONFIG_SYSV68_PARTITION is not set | ||
626 | CONFIG_NLS=y | ||
627 | CONFIG_NLS_DEFAULT="utf8" | ||
628 | CONFIG_NLS_CODEPAGE_437=y | ||
629 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
630 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
631 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
632 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
633 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
634 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
635 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
636 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
637 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
638 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
639 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
640 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
641 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
642 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
643 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
644 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
645 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
646 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
647 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
648 | # CONFIG_NLS_ISO8859_8 is not set | ||
649 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
650 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
651 | CONFIG_NLS_ASCII=m | ||
652 | # CONFIG_NLS_ISO8859_1 is not set | ||
653 | # CONFIG_NLS_ISO8859_2 is not set | ||
654 | # CONFIG_NLS_ISO8859_3 is not set | ||
655 | # CONFIG_NLS_ISO8859_4 is not set | ||
656 | # CONFIG_NLS_ISO8859_5 is not set | ||
657 | # CONFIG_NLS_ISO8859_6 is not set | ||
658 | # CONFIG_NLS_ISO8859_7 is not set | ||
659 | # CONFIG_NLS_ISO8859_9 is not set | ||
660 | # CONFIG_NLS_ISO8859_13 is not set | ||
661 | # CONFIG_NLS_ISO8859_14 is not set | ||
662 | # CONFIG_NLS_ISO8859_15 is not set | ||
663 | # CONFIG_NLS_KOI8_R is not set | ||
664 | # CONFIG_NLS_KOI8_U is not set | ||
665 | # CONFIG_NLS_UTF8 is not set | ||
666 | |||
667 | # | ||
668 | # Kernel hacking | ||
669 | # | ||
670 | # CONFIG_PRINTK_TIME is not set | ||
671 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
672 | CONFIG_ENABLE_MUST_CHECK=y | ||
673 | CONFIG_FRAME_WARN=1024 | ||
674 | CONFIG_MAGIC_SYSRQ=y | ||
675 | # CONFIG_STRIP_ASM_SYMS is not set | ||
676 | # CONFIG_UNUSED_SYMBOLS is not set | ||
677 | CONFIG_DEBUG_FS=y | ||
678 | # CONFIG_HEADERS_CHECK is not set | ||
679 | CONFIG_DEBUG_KERNEL=y | ||
680 | # CONFIG_DEBUG_SHIRQ is not set | ||
681 | CONFIG_DETECT_SOFTLOCKUP=y | ||
682 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
683 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
684 | CONFIG_DETECT_HUNG_TASK=y | ||
685 | # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set | ||
686 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 | ||
687 | CONFIG_SCHED_DEBUG=y | ||
688 | # CONFIG_SCHEDSTATS is not set | ||
689 | # CONFIG_TIMER_STATS is not set | ||
690 | # CONFIG_DEBUG_OBJECTS is not set | ||
691 | # CONFIG_SLUB_DEBUG_ON is not set | ||
692 | # CONFIG_SLUB_STATS is not set | ||
693 | # CONFIG_DEBUG_KMEMLEAK is not set | ||
694 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
695 | # CONFIG_RT_MUTEX_TESTER is not set | ||
696 | CONFIG_DEBUG_SPINLOCK=y | ||
697 | # CONFIG_DEBUG_MUTEXES is not set | ||
698 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
699 | # CONFIG_PROVE_LOCKING is not set | ||
700 | # CONFIG_LOCK_STAT is not set | ||
701 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
702 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
703 | # CONFIG_DEBUG_KOBJECT is not set | ||
704 | CONFIG_DEBUG_BUGVERBOSE=y | ||
705 | CONFIG_DEBUG_INFO=y | ||
706 | # CONFIG_DEBUG_VM is not set | ||
707 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
708 | CONFIG_DEBUG_MEMORY_INIT=y | ||
709 | # CONFIG_DEBUG_LIST is not set | ||
710 | # CONFIG_DEBUG_SG is not set | ||
711 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
712 | # CONFIG_DEBUG_CREDENTIALS is not set | ||
713 | CONFIG_FRAME_POINTER=y | ||
714 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
715 | # CONFIG_RCU_TORTURE_TEST is not set | ||
716 | CONFIG_RCU_CPU_STALL_DETECTOR=y | ||
717 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
718 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
719 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | ||
720 | # CONFIG_FAULT_INJECTION is not set | ||
721 | # CONFIG_LATENCYTOP is not set | ||
722 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
723 | # CONFIG_PAGE_POISONING is not set | ||
724 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
725 | CONFIG_TRACING_SUPPORT=y | ||
726 | CONFIG_FTRACE=y | ||
727 | # CONFIG_FUNCTION_TRACER is not set | ||
728 | # CONFIG_IRQSOFF_TRACER is not set | ||
729 | # CONFIG_SCHED_TRACER is not set | ||
730 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set | ||
731 | # CONFIG_BOOT_TRACER is not set | ||
732 | CONFIG_BRANCH_PROFILE_NONE=y | ||
733 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
734 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
735 | # CONFIG_STACK_TRACER is not set | ||
736 | # CONFIG_KMEMTRACE is not set | ||
737 | # CONFIG_WORKQUEUE_TRACER is not set | ||
738 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
739 | # CONFIG_DYNAMIC_DEBUG is not set | ||
740 | # CONFIG_SAMPLES is not set | ||
741 | CONFIG_HAVE_ARCH_KGDB=y | ||
742 | # CONFIG_KGDB is not set | ||
743 | # CONFIG_DEBUG_USER is not set | ||
744 | # CONFIG_DEBUG_ERRORS is not set | ||
745 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
746 | # CONFIG_DEBUG_LL is not set | ||
747 | |||
748 | # | ||
749 | # Security options | ||
750 | # | ||
751 | # CONFIG_KEYS is not set | ||
752 | # CONFIG_SECURITY is not set | ||
753 | # CONFIG_SECURITYFS is not set | ||
754 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
755 | # CONFIG_CRYPTO is not set | ||
756 | # CONFIG_BINARY_PRINTF is not set | ||
757 | |||
758 | # | ||
759 | # Library routines | ||
760 | # | ||
761 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
762 | # CONFIG_CRC_CCITT is not set | ||
763 | # CONFIG_CRC16 is not set | ||
764 | # CONFIG_CRC_T10DIF is not set | ||
765 | # CONFIG_CRC_ITU_T is not set | ||
766 | # CONFIG_CRC32 is not set | ||
767 | # CONFIG_CRC7 is not set | ||
768 | # CONFIG_LIBCRC32C is not set | ||
769 | CONFIG_ZLIB_INFLATE=y | ||
770 | CONFIG_DECOMPRESS_GZIP=y | ||
771 | CONFIG_DECOMPRESS_BZIP2=y | ||
772 | CONFIG_DECOMPRESS_LZMA=y | ||
773 | CONFIG_HAS_IOMEM=y | ||
774 | CONFIG_HAS_IOPORT=y | ||
775 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/spear600_defconfig b/arch/arm/configs/spear600_defconfig new file mode 100644 index 000000000000..c85a02924ec5 --- /dev/null +++ b/arch/arm/configs/spear600_defconfig | |||
@@ -0,0 +1,760 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.32 | ||
4 | # Tue Mar 23 14:37:26 2010 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_GENERIC_HARDIRQS=y | ||
12 | CONFIG_STACKTRACE_SUPPORT=y | ||
13 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
14 | CONFIG_LOCKDEP_SUPPORT=y | ||
15 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
16 | CONFIG_HARDIRQS_SW_RESEND=y | ||
17 | CONFIG_GENERIC_IRQ_PROBE=y | ||
18 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
19 | CONFIG_GENERIC_HWEIGHT=y | ||
20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
21 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
22 | CONFIG_VECTORS_BASE=0xffff0000 | ||
23 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
24 | CONFIG_CONSTRUCTORS=y | ||
25 | |||
26 | # | ||
27 | # General setup | ||
28 | # | ||
29 | CONFIG_EXPERIMENTAL=y | ||
30 | CONFIG_BROKEN_ON_SMP=y | ||
31 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
32 | CONFIG_LOCALVERSION="" | ||
33 | CONFIG_LOCALVERSION_AUTO=y | ||
34 | CONFIG_SWAP=y | ||
35 | CONFIG_SYSVIPC=y | ||
36 | CONFIG_SYSVIPC_SYSCTL=y | ||
37 | CONFIG_BSD_PROCESS_ACCT=y | ||
38 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
39 | |||
40 | # | ||
41 | # RCU Subsystem | ||
42 | # | ||
43 | CONFIG_TREE_RCU=y | ||
44 | # CONFIG_TREE_PREEMPT_RCU is not set | ||
45 | # CONFIG_RCU_TRACE is not set | ||
46 | CONFIG_RCU_FANOUT=32 | ||
47 | # CONFIG_RCU_FANOUT_EXACT is not set | ||
48 | # CONFIG_TREE_RCU_TRACE is not set | ||
49 | # CONFIG_IKCONFIG is not set | ||
50 | CONFIG_LOG_BUF_SHIFT=17 | ||
51 | # CONFIG_GROUP_SCHED is not set | ||
52 | # CONFIG_CGROUPS is not set | ||
53 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
54 | # CONFIG_RELAY is not set | ||
55 | CONFIG_NAMESPACES=y | ||
56 | # CONFIG_UTS_NS is not set | ||
57 | # CONFIG_IPC_NS is not set | ||
58 | # CONFIG_USER_NS is not set | ||
59 | # CONFIG_PID_NS is not set | ||
60 | CONFIG_BLK_DEV_INITRD=y | ||
61 | CONFIG_INITRAMFS_SOURCE="" | ||
62 | CONFIG_RD_GZIP=y | ||
63 | CONFIG_RD_BZIP2=y | ||
64 | CONFIG_RD_LZMA=y | ||
65 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
66 | CONFIG_SYSCTL=y | ||
67 | CONFIG_ANON_INODES=y | ||
68 | # CONFIG_EMBEDDED is not set | ||
69 | CONFIG_UID16=y | ||
70 | CONFIG_SYSCTL_SYSCALL=y | ||
71 | CONFIG_KALLSYMS=y | ||
72 | # CONFIG_KALLSYMS_ALL is not set | ||
73 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
74 | CONFIG_HOTPLUG=y | ||
75 | CONFIG_PRINTK=y | ||
76 | CONFIG_BUG=y | ||
77 | CONFIG_ELF_CORE=y | ||
78 | CONFIG_BASE_FULL=y | ||
79 | CONFIG_FUTEX=y | ||
80 | CONFIG_EPOLL=y | ||
81 | CONFIG_SIGNALFD=y | ||
82 | CONFIG_TIMERFD=y | ||
83 | CONFIG_EVENTFD=y | ||
84 | CONFIG_SHMEM=y | ||
85 | CONFIG_AIO=y | ||
86 | |||
87 | # | ||
88 | # Kernel Performance Events And Counters | ||
89 | # | ||
90 | CONFIG_VM_EVENT_COUNTERS=y | ||
91 | CONFIG_SLUB_DEBUG=y | ||
92 | CONFIG_COMPAT_BRK=y | ||
93 | # CONFIG_SLAB is not set | ||
94 | CONFIG_SLUB=y | ||
95 | # CONFIG_SLOB is not set | ||
96 | # CONFIG_PROFILING is not set | ||
97 | CONFIG_HAVE_OPROFILE=y | ||
98 | # CONFIG_KPROBES is not set | ||
99 | CONFIG_HAVE_KPROBES=y | ||
100 | CONFIG_HAVE_KRETPROBES=y | ||
101 | CONFIG_HAVE_CLK=y | ||
102 | |||
103 | # | ||
104 | # GCOV-based kernel profiling | ||
105 | # | ||
106 | # CONFIG_GCOV_KERNEL is not set | ||
107 | # CONFIG_SLOW_WORK is not set | ||
108 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
109 | CONFIG_SLABINFO=y | ||
110 | CONFIG_RT_MUTEXES=y | ||
111 | CONFIG_BASE_SMALL=0 | ||
112 | CONFIG_MODULES=y | ||
113 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
114 | CONFIG_MODULE_UNLOAD=y | ||
115 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
116 | CONFIG_MODVERSIONS=y | ||
117 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
118 | CONFIG_BLOCK=y | ||
119 | CONFIG_LBDAF=y | ||
120 | CONFIG_BLK_DEV_BSG=y | ||
121 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
122 | |||
123 | # | ||
124 | # IO Schedulers | ||
125 | # | ||
126 | CONFIG_IOSCHED_NOOP=y | ||
127 | CONFIG_IOSCHED_AS=y | ||
128 | CONFIG_IOSCHED_DEADLINE=y | ||
129 | CONFIG_IOSCHED_CFQ=y | ||
130 | # CONFIG_DEFAULT_AS is not set | ||
131 | # CONFIG_DEFAULT_DEADLINE is not set | ||
132 | CONFIG_DEFAULT_CFQ=y | ||
133 | # CONFIG_DEFAULT_NOOP is not set | ||
134 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
135 | # CONFIG_FREEZER is not set | ||
136 | |||
137 | # | ||
138 | # System Type | ||
139 | # | ||
140 | CONFIG_MMU=y | ||
141 | # CONFIG_ARCH_AAEC2000 is not set | ||
142 | # CONFIG_ARCH_INTEGRATOR is not set | ||
143 | # CONFIG_ARCH_REALVIEW is not set | ||
144 | # CONFIG_ARCH_VERSATILE is not set | ||
145 | # CONFIG_ARCH_AT91 is not set | ||
146 | # CONFIG_ARCH_CLPS711X is not set | ||
147 | # CONFIG_ARCH_GEMINI is not set | ||
148 | # CONFIG_ARCH_EBSA110 is not set | ||
149 | # CONFIG_ARCH_EP93XX is not set | ||
150 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
151 | # CONFIG_ARCH_MXC is not set | ||
152 | # CONFIG_ARCH_STMP3XXX is not set | ||
153 | # CONFIG_ARCH_NETX is not set | ||
154 | # CONFIG_ARCH_H720X is not set | ||
155 | # CONFIG_ARCH_NOMADIK is not set | ||
156 | # CONFIG_ARCH_IOP13XX is not set | ||
157 | # CONFIG_ARCH_IOP32X is not set | ||
158 | # CONFIG_ARCH_IOP33X is not set | ||
159 | # CONFIG_ARCH_IXP23XX is not set | ||
160 | # CONFIG_ARCH_IXP2000 is not set | ||
161 | # CONFIG_ARCH_IXP4XX is not set | ||
162 | # CONFIG_ARCH_L7200 is not set | ||
163 | # CONFIG_ARCH_KIRKWOOD is not set | ||
164 | # CONFIG_ARCH_LOKI is not set | ||
165 | # CONFIG_ARCH_MV78XX0 is not set | ||
166 | # CONFIG_ARCH_ORION5X is not set | ||
167 | # CONFIG_ARCH_MMP is not set | ||
168 | # CONFIG_ARCH_KS8695 is not set | ||
169 | # CONFIG_ARCH_NS9XXX is not set | ||
170 | # CONFIG_ARCH_W90X900 is not set | ||
171 | # CONFIG_ARCH_PNX4008 is not set | ||
172 | # CONFIG_ARCH_PXA is not set | ||
173 | # CONFIG_ARCH_MSM is not set | ||
174 | # CONFIG_ARCH_RPC is not set | ||
175 | # CONFIG_ARCH_SA1100 is not set | ||
176 | # CONFIG_ARCH_S3C2410 is not set | ||
177 | # CONFIG_ARCH_S3C64XX is not set | ||
178 | # CONFIG_ARCH_S5PC1XX is not set | ||
179 | # CONFIG_ARCH_SHARK is not set | ||
180 | # CONFIG_ARCH_LH7A40X is not set | ||
181 | # CONFIG_ARCH_U300 is not set | ||
182 | # CONFIG_ARCH_DAVINCI is not set | ||
183 | # CONFIG_ARCH_OMAP is not set | ||
184 | # CONFIG_ARCH_BCMRING is not set | ||
185 | CONFIG_PLAT_SPEAR=y | ||
186 | # CONFIG_ARCH_SPEAR3XX is not set | ||
187 | CONFIG_ARCH_SPEAR6XX=y | ||
188 | # CONFIG_MACH_SPEAR300 is not set | ||
189 | # CONFIG_MACH_SPEAR310 is not set | ||
190 | # CONFIG_MACH_SPEAR320 is not set | ||
191 | # CONFIG_BOARD_SPEAR300_EVB is not set | ||
192 | CONFIG_MACH_SPEAR600=y | ||
193 | CONFIG_BOARD_SPEAR600_EVB=y | ||
194 | |||
195 | # | ||
196 | # Processor Type | ||
197 | # | ||
198 | CONFIG_CPU_32=y | ||
199 | CONFIG_CPU_ARM926T=y | ||
200 | CONFIG_CPU_32v5=y | ||
201 | CONFIG_CPU_ABRT_EV5TJ=y | ||
202 | CONFIG_CPU_PABRT_LEGACY=y | ||
203 | CONFIG_CPU_CACHE_VIVT=y | ||
204 | CONFIG_CPU_COPY_V4WB=y | ||
205 | CONFIG_CPU_TLB_V4WBI=y | ||
206 | CONFIG_CPU_CP15=y | ||
207 | CONFIG_CPU_CP15_MMU=y | ||
208 | |||
209 | # | ||
210 | # Processor Features | ||
211 | # | ||
212 | CONFIG_ARM_THUMB=y | ||
213 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
214 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
215 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
216 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
217 | CONFIG_ARM_L1_CACHE_SHIFT=5 | ||
218 | CONFIG_ARM_VIC=y | ||
219 | CONFIG_ARM_VIC_NR=2 | ||
220 | CONFIG_COMMON_CLKDEV=y | ||
221 | |||
222 | # | ||
223 | # Bus support | ||
224 | # | ||
225 | CONFIG_ARM_AMBA=y | ||
226 | # CONFIG_PCI_SYSCALL is not set | ||
227 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
228 | # CONFIG_PCCARD is not set | ||
229 | |||
230 | # | ||
231 | # Kernel Features | ||
232 | # | ||
233 | # CONFIG_NO_HZ is not set | ||
234 | # CONFIG_HIGH_RES_TIMERS is not set | ||
235 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
236 | CONFIG_VMSPLIT_3G=y | ||
237 | # CONFIG_VMSPLIT_2G is not set | ||
238 | # CONFIG_VMSPLIT_1G is not set | ||
239 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
240 | CONFIG_PREEMPT_NONE=y | ||
241 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
242 | # CONFIG_PREEMPT is not set | ||
243 | CONFIG_HZ=100 | ||
244 | # CONFIG_AEABI is not set | ||
245 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
246 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
247 | # CONFIG_HIGHMEM is not set | ||
248 | CONFIG_SELECT_MEMORY_MODEL=y | ||
249 | CONFIG_FLATMEM_MANUAL=y | ||
250 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
251 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
252 | CONFIG_FLATMEM=y | ||
253 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
254 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
255 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
256 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
257 | CONFIG_ZONE_DMA_FLAG=0 | ||
258 | CONFIG_VIRT_TO_BUS=y | ||
259 | CONFIG_HAVE_MLOCK=y | ||
260 | CONFIG_HAVE_MLOCKED_PAGE_BIT=y | ||
261 | # CONFIG_KSM is not set | ||
262 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
263 | CONFIG_ALIGNMENT_TRAP=y | ||
264 | # CONFIG_UACCESS_WITH_MEMCPY is not set | ||
265 | |||
266 | # | ||
267 | # Boot options | ||
268 | # | ||
269 | CONFIG_ZBOOT_ROM_TEXT=0 | ||
270 | CONFIG_ZBOOT_ROM_BSS=0 | ||
271 | CONFIG_CMDLINE="" | ||
272 | # CONFIG_XIP_KERNEL is not set | ||
273 | # CONFIG_KEXEC is not set | ||
274 | |||
275 | # | ||
276 | # CPU Power Management | ||
277 | # | ||
278 | # CONFIG_CPU_IDLE is not set | ||
279 | |||
280 | # | ||
281 | # Floating point emulation | ||
282 | # | ||
283 | |||
284 | # | ||
285 | # At least one emulation must be selected | ||
286 | # | ||
287 | # CONFIG_FPE_NWFPE is not set | ||
288 | # CONFIG_FPE_FASTFPE is not set | ||
289 | # CONFIG_VFP is not set | ||
290 | |||
291 | # | ||
292 | # Userspace binary formats | ||
293 | # | ||
294 | CONFIG_BINFMT_ELF=y | ||
295 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
296 | CONFIG_HAVE_AOUT=y | ||
297 | # CONFIG_BINFMT_AOUT is not set | ||
298 | CONFIG_BINFMT_MISC=y | ||
299 | # CONFIG_ARTHUR is not set | ||
300 | |||
301 | # | ||
302 | # Power management options | ||
303 | # | ||
304 | # CONFIG_PM is not set | ||
305 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
306 | # CONFIG_NET is not set | ||
307 | |||
308 | # | ||
309 | # Device Drivers | ||
310 | # | ||
311 | |||
312 | # | ||
313 | # Generic Driver Options | ||
314 | # | ||
315 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
316 | # CONFIG_DEVTMPFS is not set | ||
317 | CONFIG_STANDALONE=y | ||
318 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
319 | CONFIG_FW_LOADER=y | ||
320 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
321 | CONFIG_EXTRA_FIRMWARE="" | ||
322 | # CONFIG_DEBUG_DRIVER is not set | ||
323 | # CONFIG_DEBUG_DEVRES is not set | ||
324 | # CONFIG_SYS_HYPERVISOR is not set | ||
325 | # CONFIG_MTD is not set | ||
326 | # CONFIG_PARPORT is not set | ||
327 | CONFIG_BLK_DEV=y | ||
328 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
329 | # CONFIG_BLK_DEV_LOOP is not set | ||
330 | CONFIG_BLK_DEV_RAM=y | ||
331 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
332 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
333 | # CONFIG_BLK_DEV_XIP is not set | ||
334 | # CONFIG_CDROM_PKTCDVD is not set | ||
335 | CONFIG_MISC_DEVICES=y | ||
336 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
337 | # CONFIG_C2PORT is not set | ||
338 | |||
339 | # | ||
340 | # EEPROM support | ||
341 | # | ||
342 | # CONFIG_EEPROM_93CX6 is not set | ||
343 | CONFIG_HAVE_IDE=y | ||
344 | # CONFIG_IDE is not set | ||
345 | |||
346 | # | ||
347 | # SCSI device support | ||
348 | # | ||
349 | # CONFIG_RAID_ATTRS is not set | ||
350 | # CONFIG_SCSI is not set | ||
351 | # CONFIG_SCSI_DMA is not set | ||
352 | # CONFIG_SCSI_NETLINK is not set | ||
353 | # CONFIG_ATA is not set | ||
354 | # CONFIG_MD is not set | ||
355 | # CONFIG_PHONE is not set | ||
356 | |||
357 | # | ||
358 | # Input device support | ||
359 | # | ||
360 | CONFIG_INPUT=y | ||
361 | CONFIG_INPUT_FF_MEMLESS=y | ||
362 | # CONFIG_INPUT_POLLDEV is not set | ||
363 | |||
364 | # | ||
365 | # Userland interfaces | ||
366 | # | ||
367 | CONFIG_INPUT_MOUSEDEV=y | ||
368 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
369 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
370 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
371 | # CONFIG_INPUT_JOYDEV is not set | ||
372 | # CONFIG_INPUT_EVDEV is not set | ||
373 | # CONFIG_INPUT_EVBUG is not set | ||
374 | |||
375 | # | ||
376 | # Hardware I/O ports | ||
377 | # | ||
378 | CONFIG_SERIO=y | ||
379 | CONFIG_SERIO_SERPORT=y | ||
380 | # CONFIG_SERIO_AMBAKMI is not set | ||
381 | # CONFIG_SERIO_RAW is not set | ||
382 | # CONFIG_GAMEPORT is not set | ||
383 | |||
384 | # | ||
385 | # Character devices | ||
386 | # | ||
387 | CONFIG_VT=y | ||
388 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
389 | CONFIG_VT_CONSOLE=y | ||
390 | CONFIG_HW_CONSOLE=y | ||
391 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
392 | CONFIG_DEVKMEM=y | ||
393 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
394 | |||
395 | # | ||
396 | # Serial drivers | ||
397 | # | ||
398 | # CONFIG_SERIAL_8250 is not set | ||
399 | |||
400 | # | ||
401 | # Non-8250 serial port support | ||
402 | # | ||
403 | # CONFIG_SERIAL_AMBA_PL010 is not set | ||
404 | CONFIG_SERIAL_AMBA_PL011=y | ||
405 | CONFIG_SERIAL_AMBA_PL011_CONSOLE=y | ||
406 | CONFIG_SERIAL_CORE=y | ||
407 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
408 | CONFIG_UNIX98_PTYS=y | ||
409 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
410 | # CONFIG_LEGACY_PTYS is not set | ||
411 | # CONFIG_R3964 is not set | ||
412 | CONFIG_RAW_DRIVER=y | ||
413 | CONFIG_MAX_RAW_DEVS=8192 | ||
414 | # CONFIG_TCG_TPM is not set | ||
415 | # CONFIG_I2C is not set | ||
416 | # CONFIG_SPI is not set | ||
417 | |||
418 | # | ||
419 | # PPS support | ||
420 | # | ||
421 | # CONFIG_PPS is not set | ||
422 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
423 | CONFIG_GPIOLIB=y | ||
424 | # CONFIG_DEBUG_GPIO is not set | ||
425 | CONFIG_GPIO_SYSFS=y | ||
426 | |||
427 | # | ||
428 | # Memory mapped GPIO expanders: | ||
429 | # | ||
430 | CONFIG_GPIO_PL061=y | ||
431 | |||
432 | # | ||
433 | # I2C GPIO expanders: | ||
434 | # | ||
435 | |||
436 | # | ||
437 | # PCI GPIO expanders: | ||
438 | # | ||
439 | |||
440 | # | ||
441 | # SPI GPIO expanders: | ||
442 | # | ||
443 | |||
444 | # | ||
445 | # AC97 GPIO expanders: | ||
446 | # | ||
447 | # CONFIG_W1 is not set | ||
448 | # CONFIG_POWER_SUPPLY is not set | ||
449 | # CONFIG_HWMON is not set | ||
450 | # CONFIG_THERMAL is not set | ||
451 | # CONFIG_WATCHDOG is not set | ||
452 | CONFIG_SSB_POSSIBLE=y | ||
453 | |||
454 | # | ||
455 | # Sonics Silicon Backplane | ||
456 | # | ||
457 | # CONFIG_SSB is not set | ||
458 | |||
459 | # | ||
460 | # Multifunction device drivers | ||
461 | # | ||
462 | # CONFIG_MFD_CORE is not set | ||
463 | # CONFIG_MFD_SM501 is not set | ||
464 | # CONFIG_HTC_PASIC3 is not set | ||
465 | # CONFIG_MFD_TMIO is not set | ||
466 | # CONFIG_MFD_T7L66XB is not set | ||
467 | # CONFIG_MFD_TC6387XB is not set | ||
468 | # CONFIG_REGULATOR is not set | ||
469 | # CONFIG_MEDIA_SUPPORT is not set | ||
470 | |||
471 | # | ||
472 | # Graphics support | ||
473 | # | ||
474 | # CONFIG_VGASTATE is not set | ||
475 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
476 | # CONFIG_FB is not set | ||
477 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
478 | |||
479 | # | ||
480 | # Display device support | ||
481 | # | ||
482 | # CONFIG_DISPLAY_SUPPORT is not set | ||
483 | |||
484 | # | ||
485 | # Console display driver support | ||
486 | # | ||
487 | # CONFIG_VGA_CONSOLE is not set | ||
488 | CONFIG_DUMMY_CONSOLE=y | ||
489 | # CONFIG_HID_SUPPORT is not set | ||
490 | # CONFIG_USB_SUPPORT is not set | ||
491 | # CONFIG_MMC is not set | ||
492 | # CONFIG_MEMSTICK is not set | ||
493 | # CONFIG_NEW_LEDS is not set | ||
494 | # CONFIG_ACCESSIBILITY is not set | ||
495 | CONFIG_RTC_LIB=y | ||
496 | # CONFIG_RTC_CLASS is not set | ||
497 | # CONFIG_DMADEVICES is not set | ||
498 | # CONFIG_AUXDISPLAY is not set | ||
499 | # CONFIG_UIO is not set | ||
500 | |||
501 | # | ||
502 | # TI VLYNQ | ||
503 | # | ||
504 | # CONFIG_STAGING is not set | ||
505 | |||
506 | # | ||
507 | # File systems | ||
508 | # | ||
509 | CONFIG_EXT2_FS=y | ||
510 | CONFIG_EXT2_FS_XATTR=y | ||
511 | # CONFIG_EXT2_FS_POSIX_ACL is not set | ||
512 | CONFIG_EXT2_FS_SECURITY=y | ||
513 | # CONFIG_EXT2_FS_XIP is not set | ||
514 | CONFIG_EXT3_FS=y | ||
515 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | ||
516 | CONFIG_EXT3_FS_XATTR=y | ||
517 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
518 | CONFIG_EXT3_FS_SECURITY=y | ||
519 | # CONFIG_EXT4_FS is not set | ||
520 | CONFIG_JBD=y | ||
521 | # CONFIG_JBD_DEBUG is not set | ||
522 | CONFIG_FS_MBCACHE=y | ||
523 | # CONFIG_REISERFS_FS is not set | ||
524 | # CONFIG_JFS_FS is not set | ||
525 | # CONFIG_FS_POSIX_ACL is not set | ||
526 | # CONFIG_XFS_FS is not set | ||
527 | # CONFIG_GFS2_FS is not set | ||
528 | # CONFIG_BTRFS_FS is not set | ||
529 | # CONFIG_NILFS2_FS is not set | ||
530 | CONFIG_FILE_LOCKING=y | ||
531 | CONFIG_FSNOTIFY=y | ||
532 | CONFIG_DNOTIFY=y | ||
533 | # CONFIG_INOTIFY is not set | ||
534 | CONFIG_INOTIFY_USER=y | ||
535 | # CONFIG_QUOTA is not set | ||
536 | # CONFIG_AUTOFS_FS is not set | ||
537 | CONFIG_AUTOFS4_FS=m | ||
538 | # CONFIG_FUSE_FS is not set | ||
539 | |||
540 | # | ||
541 | # Caches | ||
542 | # | ||
543 | # CONFIG_FSCACHE is not set | ||
544 | |||
545 | # | ||
546 | # CD-ROM/DVD Filesystems | ||
547 | # | ||
548 | # CONFIG_ISO9660_FS is not set | ||
549 | # CONFIG_UDF_FS is not set | ||
550 | |||
551 | # | ||
552 | # DOS/FAT/NT Filesystems | ||
553 | # | ||
554 | CONFIG_FAT_FS=m | ||
555 | CONFIG_MSDOS_FS=m | ||
556 | CONFIG_VFAT_FS=m | ||
557 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
558 | CONFIG_FAT_DEFAULT_IOCHARSET="ascii" | ||
559 | # CONFIG_NTFS_FS is not set | ||
560 | |||
561 | # | ||
562 | # Pseudo filesystems | ||
563 | # | ||
564 | CONFIG_PROC_FS=y | ||
565 | CONFIG_PROC_SYSCTL=y | ||
566 | CONFIG_PROC_PAGE_MONITOR=y | ||
567 | CONFIG_SYSFS=y | ||
568 | CONFIG_TMPFS=y | ||
569 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
570 | # CONFIG_HUGETLB_PAGE is not set | ||
571 | # CONFIG_CONFIGFS_FS is not set | ||
572 | CONFIG_MISC_FILESYSTEMS=y | ||
573 | # CONFIG_ADFS_FS is not set | ||
574 | # CONFIG_AFFS_FS is not set | ||
575 | # CONFIG_HFS_FS is not set | ||
576 | # CONFIG_HFSPLUS_FS is not set | ||
577 | # CONFIG_BEFS_FS is not set | ||
578 | # CONFIG_BFS_FS is not set | ||
579 | # CONFIG_EFS_FS is not set | ||
580 | # CONFIG_SQUASHFS is not set | ||
581 | # CONFIG_VXFS_FS is not set | ||
582 | # CONFIG_MINIX_FS is not set | ||
583 | # CONFIG_OMFS_FS is not set | ||
584 | # CONFIG_HPFS_FS is not set | ||
585 | # CONFIG_QNX4FS_FS is not set | ||
586 | # CONFIG_ROMFS_FS is not set | ||
587 | # CONFIG_SYSV_FS is not set | ||
588 | # CONFIG_UFS_FS is not set | ||
589 | |||
590 | # | ||
591 | # Partition Types | ||
592 | # | ||
593 | CONFIG_PARTITION_ADVANCED=y | ||
594 | # CONFIG_ACORN_PARTITION is not set | ||
595 | # CONFIG_OSF_PARTITION is not set | ||
596 | # CONFIG_AMIGA_PARTITION is not set | ||
597 | # CONFIG_ATARI_PARTITION is not set | ||
598 | # CONFIG_MAC_PARTITION is not set | ||
599 | CONFIG_MSDOS_PARTITION=y | ||
600 | # CONFIG_BSD_DISKLABEL is not set | ||
601 | # CONFIG_MINIX_SUBPARTITION is not set | ||
602 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
603 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
604 | # CONFIG_LDM_PARTITION is not set | ||
605 | # CONFIG_SGI_PARTITION is not set | ||
606 | # CONFIG_ULTRIX_PARTITION is not set | ||
607 | # CONFIG_SUN_PARTITION is not set | ||
608 | # CONFIG_KARMA_PARTITION is not set | ||
609 | # CONFIG_EFI_PARTITION is not set | ||
610 | # CONFIG_SYSV68_PARTITION is not set | ||
611 | CONFIG_NLS=y | ||
612 | CONFIG_NLS_DEFAULT="utf8" | ||
613 | CONFIG_NLS_CODEPAGE_437=y | ||
614 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
615 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
616 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
617 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
618 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
619 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
620 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
621 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
622 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
623 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
624 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
625 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
626 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
627 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
628 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
629 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
630 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
631 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
632 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
633 | # CONFIG_NLS_ISO8859_8 is not set | ||
634 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
635 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
636 | CONFIG_NLS_ASCII=m | ||
637 | # CONFIG_NLS_ISO8859_1 is not set | ||
638 | # CONFIG_NLS_ISO8859_2 is not set | ||
639 | # CONFIG_NLS_ISO8859_3 is not set | ||
640 | # CONFIG_NLS_ISO8859_4 is not set | ||
641 | # CONFIG_NLS_ISO8859_5 is not set | ||
642 | # CONFIG_NLS_ISO8859_6 is not set | ||
643 | # CONFIG_NLS_ISO8859_7 is not set | ||
644 | # CONFIG_NLS_ISO8859_9 is not set | ||
645 | # CONFIG_NLS_ISO8859_13 is not set | ||
646 | # CONFIG_NLS_ISO8859_14 is not set | ||
647 | # CONFIG_NLS_ISO8859_15 is not set | ||
648 | # CONFIG_NLS_KOI8_R is not set | ||
649 | # CONFIG_NLS_KOI8_U is not set | ||
650 | # CONFIG_NLS_UTF8 is not set | ||
651 | |||
652 | # | ||
653 | # Kernel hacking | ||
654 | # | ||
655 | # CONFIG_PRINTK_TIME is not set | ||
656 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
657 | CONFIG_ENABLE_MUST_CHECK=y | ||
658 | CONFIG_FRAME_WARN=1024 | ||
659 | CONFIG_MAGIC_SYSRQ=y | ||
660 | # CONFIG_STRIP_ASM_SYMS is not set | ||
661 | # CONFIG_UNUSED_SYMBOLS is not set | ||
662 | CONFIG_DEBUG_FS=y | ||
663 | # CONFIG_HEADERS_CHECK is not set | ||
664 | CONFIG_DEBUG_KERNEL=y | ||
665 | # CONFIG_DEBUG_SHIRQ is not set | ||
666 | CONFIG_DETECT_SOFTLOCKUP=y | ||
667 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
668 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
669 | CONFIG_DETECT_HUNG_TASK=y | ||
670 | # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set | ||
671 | CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 | ||
672 | CONFIG_SCHED_DEBUG=y | ||
673 | # CONFIG_SCHEDSTATS is not set | ||
674 | # CONFIG_TIMER_STATS is not set | ||
675 | # CONFIG_DEBUG_OBJECTS is not set | ||
676 | # CONFIG_SLUB_DEBUG_ON is not set | ||
677 | # CONFIG_SLUB_STATS is not set | ||
678 | # CONFIG_DEBUG_KMEMLEAK is not set | ||
679 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
680 | # CONFIG_RT_MUTEX_TESTER is not set | ||
681 | CONFIG_DEBUG_SPINLOCK=y | ||
682 | # CONFIG_DEBUG_MUTEXES is not set | ||
683 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
684 | # CONFIG_PROVE_LOCKING is not set | ||
685 | # CONFIG_LOCK_STAT is not set | ||
686 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
687 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
688 | # CONFIG_DEBUG_KOBJECT is not set | ||
689 | CONFIG_DEBUG_BUGVERBOSE=y | ||
690 | CONFIG_DEBUG_INFO=y | ||
691 | # CONFIG_DEBUG_VM is not set | ||
692 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
693 | CONFIG_DEBUG_MEMORY_INIT=y | ||
694 | # CONFIG_DEBUG_LIST is not set | ||
695 | # CONFIG_DEBUG_SG is not set | ||
696 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
697 | # CONFIG_DEBUG_CREDENTIALS is not set | ||
698 | CONFIG_FRAME_POINTER=y | ||
699 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
700 | # CONFIG_RCU_TORTURE_TEST is not set | ||
701 | CONFIG_RCU_CPU_STALL_DETECTOR=y | ||
702 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
703 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
704 | # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set | ||
705 | # CONFIG_FAULT_INJECTION is not set | ||
706 | # CONFIG_LATENCYTOP is not set | ||
707 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
708 | # CONFIG_PAGE_POISONING is not set | ||
709 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
710 | CONFIG_TRACING_SUPPORT=y | ||
711 | CONFIG_FTRACE=y | ||
712 | # CONFIG_FUNCTION_TRACER is not set | ||
713 | # CONFIG_IRQSOFF_TRACER is not set | ||
714 | # CONFIG_SCHED_TRACER is not set | ||
715 | # CONFIG_ENABLE_DEFAULT_TRACERS is not set | ||
716 | # CONFIG_BOOT_TRACER is not set | ||
717 | CONFIG_BRANCH_PROFILE_NONE=y | ||
718 | # CONFIG_PROFILE_ANNOTATED_BRANCHES is not set | ||
719 | # CONFIG_PROFILE_ALL_BRANCHES is not set | ||
720 | # CONFIG_STACK_TRACER is not set | ||
721 | # CONFIG_KMEMTRACE is not set | ||
722 | # CONFIG_WORKQUEUE_TRACER is not set | ||
723 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
724 | # CONFIG_DYNAMIC_DEBUG is not set | ||
725 | # CONFIG_SAMPLES is not set | ||
726 | CONFIG_HAVE_ARCH_KGDB=y | ||
727 | # CONFIG_KGDB is not set | ||
728 | # CONFIG_DEBUG_USER is not set | ||
729 | # CONFIG_DEBUG_ERRORS is not set | ||
730 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
731 | # CONFIG_DEBUG_LL is not set | ||
732 | |||
733 | # | ||
734 | # Security options | ||
735 | # | ||
736 | # CONFIG_KEYS is not set | ||
737 | # CONFIG_SECURITY is not set | ||
738 | # CONFIG_SECURITYFS is not set | ||
739 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
740 | # CONFIG_CRYPTO is not set | ||
741 | # CONFIG_BINARY_PRINTF is not set | ||
742 | |||
743 | # | ||
744 | # Library routines | ||
745 | # | ||
746 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
747 | # CONFIG_CRC_CCITT is not set | ||
748 | # CONFIG_CRC16 is not set | ||
749 | # CONFIG_CRC_T10DIF is not set | ||
750 | # CONFIG_CRC_ITU_T is not set | ||
751 | # CONFIG_CRC32 is not set | ||
752 | # CONFIG_CRC7 is not set | ||
753 | # CONFIG_LIBCRC32C is not set | ||
754 | CONFIG_ZLIB_INFLATE=y | ||
755 | CONFIG_DECOMPRESS_GZIP=y | ||
756 | CONFIG_DECOMPRESS_BZIP2=y | ||
757 | CONFIG_DECOMPRESS_LZMA=y | ||
758 | CONFIG_HAS_IOMEM=y | ||
759 | CONFIG_HAS_IOPORT=y | ||
760 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/stamp9g20_defconfig b/arch/arm/configs/stamp9g20_defconfig new file mode 100644 index 000000000000..06a8293c61ca --- /dev/null +++ b/arch/arm/configs/stamp9g20_defconfig | |||
@@ -0,0 +1,1456 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.34-rc1 | ||
4 | # Wed Mar 17 16:38:03 2010 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_HAVE_PROC_CPU=y | ||
12 | CONFIG_GENERIC_HARDIRQS=y | ||
13 | CONFIG_STACKTRACE_SUPPORT=y | ||
14 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
15 | CONFIG_LOCKDEP_SUPPORT=y | ||
16 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
17 | CONFIG_HARDIRQS_SW_RESEND=y | ||
18 | CONFIG_GENERIC_IRQ_PROBE=y | ||
19 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
20 | CONFIG_GENERIC_HWEIGHT=y | ||
21 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
22 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
23 | CONFIG_VECTORS_BASE=0xffff0000 | ||
24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
25 | CONFIG_CONSTRUCTORS=y | ||
26 | |||
27 | # | ||
28 | # General setup | ||
29 | # | ||
30 | CONFIG_EXPERIMENTAL=y | ||
31 | CONFIG_BROKEN_ON_SMP=y | ||
32 | CONFIG_LOCK_KERNEL=y | ||
33 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
34 | CONFIG_LOCALVERSION="" | ||
35 | # CONFIG_LOCALVERSION_AUTO is not set | ||
36 | CONFIG_HAVE_KERNEL_GZIP=y | ||
37 | CONFIG_HAVE_KERNEL_LZO=y | ||
38 | CONFIG_KERNEL_GZIP=y | ||
39 | # CONFIG_KERNEL_BZIP2 is not set | ||
40 | # CONFIG_KERNEL_LZMA is not set | ||
41 | # CONFIG_KERNEL_LZO is not set | ||
42 | # CONFIG_SWAP is not set | ||
43 | CONFIG_SYSVIPC=y | ||
44 | CONFIG_SYSVIPC_SYSCTL=y | ||
45 | # CONFIG_POSIX_MQUEUE is not set | ||
46 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
47 | # CONFIG_TASKSTATS is not set | ||
48 | # CONFIG_AUDIT is not set | ||
49 | |||
50 | # | ||
51 | # RCU Subsystem | ||
52 | # | ||
53 | # CONFIG_TREE_RCU is not set | ||
54 | CONFIG_TREE_PREEMPT_RCU=y | ||
55 | # CONFIG_TINY_RCU is not set | ||
56 | # CONFIG_RCU_TRACE is not set | ||
57 | CONFIG_RCU_FANOUT=32 | ||
58 | # CONFIG_RCU_FANOUT_EXACT is not set | ||
59 | # CONFIG_TREE_RCU_TRACE is not set | ||
60 | # CONFIG_IKCONFIG is not set | ||
61 | CONFIG_LOG_BUF_SHIFT=14 | ||
62 | # CONFIG_CGROUPS is not set | ||
63 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
64 | # CONFIG_RELAY is not set | ||
65 | CONFIG_NAMESPACES=y | ||
66 | # CONFIG_UTS_NS is not set | ||
67 | # CONFIG_IPC_NS is not set | ||
68 | # CONFIG_USER_NS is not set | ||
69 | # CONFIG_PID_NS is not set | ||
70 | # CONFIG_NET_NS is not set | ||
71 | CONFIG_BLK_DEV_INITRD=y | ||
72 | CONFIG_INITRAMFS_SOURCE="" | ||
73 | CONFIG_RD_GZIP=y | ||
74 | CONFIG_RD_BZIP2=y | ||
75 | CONFIG_RD_LZMA=y | ||
76 | CONFIG_RD_LZO=y | ||
77 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
78 | CONFIG_SYSCTL=y | ||
79 | CONFIG_ANON_INODES=y | ||
80 | # CONFIG_EMBEDDED is not set | ||
81 | CONFIG_UID16=y | ||
82 | CONFIG_SYSCTL_SYSCALL=y | ||
83 | CONFIG_KALLSYMS=y | ||
84 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
85 | CONFIG_HOTPLUG=y | ||
86 | CONFIG_PRINTK=y | ||
87 | CONFIG_BUG=y | ||
88 | CONFIG_ELF_CORE=y | ||
89 | CONFIG_BASE_FULL=y | ||
90 | CONFIG_FUTEX=y | ||
91 | CONFIG_EPOLL=y | ||
92 | CONFIG_SIGNALFD=y | ||
93 | CONFIG_TIMERFD=y | ||
94 | CONFIG_EVENTFD=y | ||
95 | CONFIG_SHMEM=y | ||
96 | CONFIG_AIO=y | ||
97 | CONFIG_HAVE_PERF_EVENTS=y | ||
98 | CONFIG_PERF_USE_VMALLOC=y | ||
99 | |||
100 | # | ||
101 | # Kernel Performance Events And Counters | ||
102 | # | ||
103 | # CONFIG_PERF_EVENTS is not set | ||
104 | # CONFIG_PERF_COUNTERS is not set | ||
105 | CONFIG_VM_EVENT_COUNTERS=y | ||
106 | CONFIG_COMPAT_BRK=y | ||
107 | CONFIG_SLAB=y | ||
108 | # CONFIG_SLUB is not set | ||
109 | # CONFIG_SLOB is not set | ||
110 | # CONFIG_PROFILING is not set | ||
111 | CONFIG_HAVE_OPROFILE=y | ||
112 | # CONFIG_KPROBES is not set | ||
113 | CONFIG_HAVE_KPROBES=y | ||
114 | CONFIG_HAVE_KRETPROBES=y | ||
115 | CONFIG_HAVE_CLK=y | ||
116 | |||
117 | # | ||
118 | # GCOV-based kernel profiling | ||
119 | # | ||
120 | # CONFIG_SLOW_WORK is not set | ||
121 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
122 | CONFIG_SLABINFO=y | ||
123 | CONFIG_RT_MUTEXES=y | ||
124 | CONFIG_BASE_SMALL=0 | ||
125 | CONFIG_MODULES=y | ||
126 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
127 | CONFIG_MODULE_UNLOAD=y | ||
128 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
129 | # CONFIG_MODVERSIONS is not set | ||
130 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
131 | CONFIG_BLOCK=y | ||
132 | # CONFIG_LBDAF is not set | ||
133 | # CONFIG_BLK_DEV_BSG is not set | ||
134 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
135 | |||
136 | # | ||
137 | # IO Schedulers | ||
138 | # | ||
139 | CONFIG_IOSCHED_NOOP=y | ||
140 | # CONFIG_IOSCHED_DEADLINE is not set | ||
141 | CONFIG_IOSCHED_CFQ=y | ||
142 | # CONFIG_DEFAULT_DEADLINE is not set | ||
143 | CONFIG_DEFAULT_CFQ=y | ||
144 | # CONFIG_DEFAULT_NOOP is not set | ||
145 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
146 | # CONFIG_INLINE_SPIN_TRYLOCK is not set | ||
147 | # CONFIG_INLINE_SPIN_TRYLOCK_BH is not set | ||
148 | # CONFIG_INLINE_SPIN_LOCK is not set | ||
149 | # CONFIG_INLINE_SPIN_LOCK_BH is not set | ||
150 | # CONFIG_INLINE_SPIN_LOCK_IRQ is not set | ||
151 | # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set | ||
152 | # CONFIG_INLINE_SPIN_UNLOCK is not set | ||
153 | # CONFIG_INLINE_SPIN_UNLOCK_BH is not set | ||
154 | # CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set | ||
155 | # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set | ||
156 | # CONFIG_INLINE_READ_TRYLOCK is not set | ||
157 | # CONFIG_INLINE_READ_LOCK is not set | ||
158 | # CONFIG_INLINE_READ_LOCK_BH is not set | ||
159 | # CONFIG_INLINE_READ_LOCK_IRQ is not set | ||
160 | # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set | ||
161 | # CONFIG_INLINE_READ_UNLOCK is not set | ||
162 | # CONFIG_INLINE_READ_UNLOCK_BH is not set | ||
163 | # CONFIG_INLINE_READ_UNLOCK_IRQ is not set | ||
164 | # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set | ||
165 | # CONFIG_INLINE_WRITE_TRYLOCK is not set | ||
166 | # CONFIG_INLINE_WRITE_LOCK is not set | ||
167 | # CONFIG_INLINE_WRITE_LOCK_BH is not set | ||
168 | # CONFIG_INLINE_WRITE_LOCK_IRQ is not set | ||
169 | # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set | ||
170 | # CONFIG_INLINE_WRITE_UNLOCK is not set | ||
171 | # CONFIG_INLINE_WRITE_UNLOCK_BH is not set | ||
172 | # CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set | ||
173 | # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set | ||
174 | # CONFIG_MUTEX_SPIN_ON_OWNER is not set | ||
175 | CONFIG_FREEZER=y | ||
176 | |||
177 | # | ||
178 | # System Type | ||
179 | # | ||
180 | CONFIG_MMU=y | ||
181 | # CONFIG_ARCH_AAEC2000 is not set | ||
182 | # CONFIG_ARCH_INTEGRATOR is not set | ||
183 | # CONFIG_ARCH_REALVIEW is not set | ||
184 | # CONFIG_ARCH_VERSATILE is not set | ||
185 | CONFIG_ARCH_AT91=y | ||
186 | # CONFIG_ARCH_CLPS711X is not set | ||
187 | # CONFIG_ARCH_GEMINI is not set | ||
188 | # CONFIG_ARCH_EBSA110 is not set | ||
189 | # CONFIG_ARCH_EP93XX is not set | ||
190 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
191 | # CONFIG_ARCH_MXC is not set | ||
192 | # CONFIG_ARCH_STMP3XXX is not set | ||
193 | # CONFIG_ARCH_NETX is not set | ||
194 | # CONFIG_ARCH_H720X is not set | ||
195 | # CONFIG_ARCH_NOMADIK is not set | ||
196 | # CONFIG_ARCH_IOP13XX is not set | ||
197 | # CONFIG_ARCH_IOP32X is not set | ||
198 | # CONFIG_ARCH_IOP33X is not set | ||
199 | # CONFIG_ARCH_IXP23XX is not set | ||
200 | # CONFIG_ARCH_IXP2000 is not set | ||
201 | # CONFIG_ARCH_IXP4XX is not set | ||
202 | # CONFIG_ARCH_L7200 is not set | ||
203 | # CONFIG_ARCH_DOVE is not set | ||
204 | # CONFIG_ARCH_KIRKWOOD is not set | ||
205 | # CONFIG_ARCH_LOKI is not set | ||
206 | # CONFIG_ARCH_MV78XX0 is not set | ||
207 | # CONFIG_ARCH_ORION5X is not set | ||
208 | # CONFIG_ARCH_MMP is not set | ||
209 | # CONFIG_ARCH_KS8695 is not set | ||
210 | # CONFIG_ARCH_NS9XXX is not set | ||
211 | # CONFIG_ARCH_W90X900 is not set | ||
212 | # CONFIG_ARCH_NUC93X is not set | ||
213 | # CONFIG_ARCH_PNX4008 is not set | ||
214 | # CONFIG_ARCH_PXA is not set | ||
215 | # CONFIG_ARCH_MSM is not set | ||
216 | # CONFIG_ARCH_RPC is not set | ||
217 | # CONFIG_ARCH_SA1100 is not set | ||
218 | # CONFIG_ARCH_S3C2410 is not set | ||
219 | # CONFIG_ARCH_S3C64XX is not set | ||
220 | # CONFIG_ARCH_S5PC1XX is not set | ||
221 | # CONFIG_ARCH_SHARK is not set | ||
222 | # CONFIG_ARCH_LH7A40X is not set | ||
223 | # CONFIG_ARCH_U300 is not set | ||
224 | # CONFIG_ARCH_DAVINCI is not set | ||
225 | # CONFIG_ARCH_OMAP is not set | ||
226 | # CONFIG_ARCH_BCMRING is not set | ||
227 | # CONFIG_ARCH_U8500 is not set | ||
228 | CONFIG_HAVE_AT91_USART3=y | ||
229 | CONFIG_HAVE_AT91_USART4=y | ||
230 | CONFIG_HAVE_AT91_USART5=y | ||
231 | |||
232 | # | ||
233 | # Atmel AT91 System-on-Chip | ||
234 | # | ||
235 | # CONFIG_ARCH_AT91RM9200 is not set | ||
236 | # CONFIG_ARCH_AT91SAM9260 is not set | ||
237 | # CONFIG_ARCH_AT91SAM9261 is not set | ||
238 | # CONFIG_ARCH_AT91SAM9G10 is not set | ||
239 | # CONFIG_ARCH_AT91SAM9263 is not set | ||
240 | # CONFIG_ARCH_AT91SAM9RL is not set | ||
241 | CONFIG_ARCH_AT91SAM9G20=y | ||
242 | # CONFIG_ARCH_AT91SAM9G45 is not set | ||
243 | # CONFIG_ARCH_AT91CAP9 is not set | ||
244 | # CONFIG_ARCH_AT572D940HF is not set | ||
245 | # CONFIG_ARCH_AT91X40 is not set | ||
246 | CONFIG_AT91_PMC_UNIT=y | ||
247 | |||
248 | # | ||
249 | # AT91SAM9G20 Board Type | ||
250 | # | ||
251 | # CONFIG_MACH_AT91SAM9G20EK is not set | ||
252 | # CONFIG_MACH_AT91SAM9G20EK_2MMC is not set | ||
253 | # CONFIG_MACH_CPU9G20 is not set | ||
254 | CONFIG_MACH_PORTUXG20=y | ||
255 | CONFIG_MACH_STAMP9G20=y | ||
256 | |||
257 | # | ||
258 | # AT91 Board Options | ||
259 | # | ||
260 | |||
261 | # | ||
262 | # AT91 Feature Selections | ||
263 | # | ||
264 | CONFIG_AT91_PROGRAMMABLE_CLOCKS=y | ||
265 | CONFIG_AT91_SLOW_CLOCK=y | ||
266 | CONFIG_AT91_TIMER_HZ=100 | ||
267 | CONFIG_AT91_EARLY_DBGU=y | ||
268 | # CONFIG_AT91_EARLY_USART0 is not set | ||
269 | # CONFIG_AT91_EARLY_USART1 is not set | ||
270 | # CONFIG_AT91_EARLY_USART2 is not set | ||
271 | # CONFIG_AT91_EARLY_USART3 is not set | ||
272 | # CONFIG_AT91_EARLY_USART4 is not set | ||
273 | # CONFIG_AT91_EARLY_USART5 is not set | ||
274 | |||
275 | # | ||
276 | # Processor Type | ||
277 | # | ||
278 | CONFIG_CPU_ARM926T=y | ||
279 | CONFIG_CPU_32v5=y | ||
280 | CONFIG_CPU_ABRT_EV5TJ=y | ||
281 | CONFIG_CPU_PABRT_LEGACY=y | ||
282 | CONFIG_CPU_CACHE_VIVT=y | ||
283 | CONFIG_CPU_COPY_V4WB=y | ||
284 | CONFIG_CPU_TLB_V4WBI=y | ||
285 | CONFIG_CPU_CP15=y | ||
286 | CONFIG_CPU_CP15_MMU=y | ||
287 | |||
288 | # | ||
289 | # Processor Features | ||
290 | # | ||
291 | CONFIG_ARM_THUMB=y | ||
292 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
293 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
294 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
295 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
296 | CONFIG_ARM_L1_CACHE_SHIFT=5 | ||
297 | |||
298 | # | ||
299 | # Bus support | ||
300 | # | ||
301 | # CONFIG_PCI_SYSCALL is not set | ||
302 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
303 | # CONFIG_PCCARD is not set | ||
304 | |||
305 | # | ||
306 | # Kernel Features | ||
307 | # | ||
308 | CONFIG_TICK_ONESHOT=y | ||
309 | CONFIG_NO_HZ=y | ||
310 | CONFIG_HIGH_RES_TIMERS=y | ||
311 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
312 | CONFIG_VMSPLIT_3G=y | ||
313 | # CONFIG_VMSPLIT_2G is not set | ||
314 | # CONFIG_VMSPLIT_1G is not set | ||
315 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
316 | # CONFIG_PREEMPT_NONE is not set | ||
317 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
318 | CONFIG_PREEMPT=y | ||
319 | CONFIG_HZ=100 | ||
320 | CONFIG_AEABI=y | ||
321 | # CONFIG_OABI_COMPAT is not set | ||
322 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
323 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
324 | # CONFIG_HIGHMEM is not set | ||
325 | CONFIG_SELECT_MEMORY_MODEL=y | ||
326 | CONFIG_FLATMEM_MANUAL=y | ||
327 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
328 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
329 | CONFIG_FLATMEM=y | ||
330 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
331 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
332 | CONFIG_SPLIT_PTLOCK_CPUS=999999 | ||
333 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
334 | CONFIG_ZONE_DMA_FLAG=0 | ||
335 | CONFIG_VIRT_TO_BUS=y | ||
336 | # CONFIG_KSM is not set | ||
337 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | ||
338 | # CONFIG_LEDS is not set | ||
339 | CONFIG_ALIGNMENT_TRAP=y | ||
340 | # CONFIG_UACCESS_WITH_MEMCPY is not set | ||
341 | |||
342 | # | ||
343 | # Boot options | ||
344 | # | ||
345 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
346 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
347 | CONFIG_CMDLINE="mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 root=/dev/ram0 rw" | ||
348 | # CONFIG_XIP_KERNEL is not set | ||
349 | CONFIG_KEXEC=y | ||
350 | CONFIG_ATAGS_PROC=y | ||
351 | |||
352 | # | ||
353 | # CPU Power Management | ||
354 | # | ||
355 | CONFIG_CPU_IDLE=y | ||
356 | CONFIG_CPU_IDLE_GOV_LADDER=y | ||
357 | CONFIG_CPU_IDLE_GOV_MENU=y | ||
358 | |||
359 | # | ||
360 | # Floating point emulation | ||
361 | # | ||
362 | |||
363 | # | ||
364 | # At least one emulation must be selected | ||
365 | # | ||
366 | # CONFIG_VFP is not set | ||
367 | |||
368 | # | ||
369 | # Userspace binary formats | ||
370 | # | ||
371 | CONFIG_BINFMT_ELF=y | ||
372 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
373 | CONFIG_HAVE_AOUT=y | ||
374 | # CONFIG_BINFMT_AOUT is not set | ||
375 | # CONFIG_BINFMT_MISC is not set | ||
376 | |||
377 | # | ||
378 | # Power management options | ||
379 | # | ||
380 | CONFIG_PM=y | ||
381 | # CONFIG_PM_DEBUG is not set | ||
382 | CONFIG_PM_SLEEP=y | ||
383 | CONFIG_SUSPEND=y | ||
384 | CONFIG_SUSPEND_FREEZER=y | ||
385 | # CONFIG_APM_EMULATION is not set | ||
386 | # CONFIG_PM_RUNTIME is not set | ||
387 | CONFIG_PM_OPS=y | ||
388 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
389 | CONFIG_NET=y | ||
390 | |||
391 | # | ||
392 | # Networking options | ||
393 | # | ||
394 | CONFIG_PACKET=y | ||
395 | CONFIG_UNIX=y | ||
396 | # CONFIG_NET_KEY is not set | ||
397 | CONFIG_INET=y | ||
398 | # CONFIG_IP_MULTICAST is not set | ||
399 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
400 | CONFIG_IP_FIB_HASH=y | ||
401 | # CONFIG_IP_PNP is not set | ||
402 | # CONFIG_NET_IPIP is not set | ||
403 | # CONFIG_NET_IPGRE is not set | ||
404 | # CONFIG_ARPD is not set | ||
405 | # CONFIG_SYN_COOKIES is not set | ||
406 | # CONFIG_INET_AH is not set | ||
407 | # CONFIG_INET_ESP is not set | ||
408 | # CONFIG_INET_IPCOMP is not set | ||
409 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
410 | # CONFIG_INET_TUNNEL is not set | ||
411 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
412 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
413 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
414 | # CONFIG_INET_LRO is not set | ||
415 | CONFIG_INET_DIAG=y | ||
416 | CONFIG_INET_TCP_DIAG=y | ||
417 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
418 | CONFIG_TCP_CONG_CUBIC=y | ||
419 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
420 | # CONFIG_TCP_MD5SIG is not set | ||
421 | # CONFIG_IPV6 is not set | ||
422 | # CONFIG_NETWORK_SECMARK is not set | ||
423 | # CONFIG_NETFILTER is not set | ||
424 | # CONFIG_IP_DCCP is not set | ||
425 | # CONFIG_IP_SCTP is not set | ||
426 | # CONFIG_RDS is not set | ||
427 | # CONFIG_TIPC is not set | ||
428 | # CONFIG_ATM is not set | ||
429 | # CONFIG_BRIDGE is not set | ||
430 | # CONFIG_NET_DSA is not set | ||
431 | # CONFIG_VLAN_8021Q is not set | ||
432 | # CONFIG_DECNET is not set | ||
433 | # CONFIG_LLC2 is not set | ||
434 | # CONFIG_IPX is not set | ||
435 | # CONFIG_ATALK is not set | ||
436 | # CONFIG_X25 is not set | ||
437 | # CONFIG_LAPB is not set | ||
438 | # CONFIG_ECONET is not set | ||
439 | # CONFIG_WAN_ROUTER is not set | ||
440 | # CONFIG_PHONET is not set | ||
441 | # CONFIG_IEEE802154 is not set | ||
442 | # CONFIG_NET_SCHED is not set | ||
443 | # CONFIG_DCB is not set | ||
444 | |||
445 | # | ||
446 | # Network testing | ||
447 | # | ||
448 | # CONFIG_NET_PKTGEN is not set | ||
449 | # CONFIG_HAMRADIO is not set | ||
450 | # CONFIG_CAN is not set | ||
451 | # CONFIG_IRDA is not set | ||
452 | # CONFIG_BT is not set | ||
453 | # CONFIG_AF_RXRPC is not set | ||
454 | # CONFIG_WIRELESS is not set | ||
455 | # CONFIG_WIMAX is not set | ||
456 | # CONFIG_RFKILL is not set | ||
457 | # CONFIG_NET_9P is not set | ||
458 | |||
459 | # | ||
460 | # Device Drivers | ||
461 | # | ||
462 | |||
463 | # | ||
464 | # Generic Driver Options | ||
465 | # | ||
466 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
467 | # CONFIG_DEVTMPFS is not set | ||
468 | CONFIG_STANDALONE=y | ||
469 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
470 | CONFIG_FW_LOADER=y | ||
471 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
472 | CONFIG_EXTRA_FIRMWARE="" | ||
473 | # CONFIG_SYS_HYPERVISOR is not set | ||
474 | # CONFIG_CONNECTOR is not set | ||
475 | CONFIG_MTD=y | ||
476 | # CONFIG_MTD_DEBUG is not set | ||
477 | # CONFIG_MTD_TESTS is not set | ||
478 | CONFIG_MTD_CONCAT=y | ||
479 | CONFIG_MTD_PARTITIONS=y | ||
480 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
481 | CONFIG_MTD_CMDLINE_PARTS=y | ||
482 | # CONFIG_MTD_AFS_PARTS is not set | ||
483 | # CONFIG_MTD_AR7_PARTS is not set | ||
484 | |||
485 | # | ||
486 | # User Modules And Translation Layers | ||
487 | # | ||
488 | CONFIG_MTD_CHAR=y | ||
489 | CONFIG_MTD_BLKDEVS=y | ||
490 | CONFIG_MTD_BLOCK=y | ||
491 | # CONFIG_FTL is not set | ||
492 | # CONFIG_NFTL is not set | ||
493 | # CONFIG_INFTL is not set | ||
494 | # CONFIG_RFD_FTL is not set | ||
495 | # CONFIG_SSFDC is not set | ||
496 | # CONFIG_MTD_OOPS is not set | ||
497 | |||
498 | # | ||
499 | # RAM/ROM/Flash chip drivers | ||
500 | # | ||
501 | # CONFIG_MTD_CFI is not set | ||
502 | # CONFIG_MTD_JEDECPROBE is not set | ||
503 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
504 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
505 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
506 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
507 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
508 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
509 | CONFIG_MTD_CFI_I1=y | ||
510 | CONFIG_MTD_CFI_I2=y | ||
511 | # CONFIG_MTD_CFI_I4 is not set | ||
512 | # CONFIG_MTD_CFI_I8 is not set | ||
513 | # CONFIG_MTD_RAM is not set | ||
514 | # CONFIG_MTD_ROM is not set | ||
515 | # CONFIG_MTD_ABSENT is not set | ||
516 | |||
517 | # | ||
518 | # Mapping drivers for chip access | ||
519 | # | ||
520 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
521 | # CONFIG_MTD_PLATRAM is not set | ||
522 | |||
523 | # | ||
524 | # Self-contained MTD device drivers | ||
525 | # | ||
526 | CONFIG_MTD_DATAFLASH=y | ||
527 | # CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set | ||
528 | # CONFIG_MTD_DATAFLASH_OTP is not set | ||
529 | # CONFIG_MTD_M25P80 is not set | ||
530 | # CONFIG_MTD_SST25L is not set | ||
531 | # CONFIG_MTD_SLRAM is not set | ||
532 | # CONFIG_MTD_PHRAM is not set | ||
533 | # CONFIG_MTD_MTDRAM is not set | ||
534 | # CONFIG_MTD_BLOCK2MTD is not set | ||
535 | |||
536 | # | ||
537 | # Disk-On-Chip Device Drivers | ||
538 | # | ||
539 | # CONFIG_MTD_DOC2000 is not set | ||
540 | # CONFIG_MTD_DOC2001 is not set | ||
541 | # CONFIG_MTD_DOC2001PLUS is not set | ||
542 | CONFIG_MTD_NAND=y | ||
543 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
544 | # CONFIG_MTD_NAND_ECC_SMC is not set | ||
545 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||
546 | # CONFIG_MTD_NAND_GPIO is not set | ||
547 | CONFIG_MTD_NAND_IDS=y | ||
548 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
549 | CONFIG_MTD_NAND_ATMEL=y | ||
550 | # CONFIG_MTD_NAND_ATMEL_ECC_HW is not set | ||
551 | CONFIG_MTD_NAND_ATMEL_ECC_SOFT=y | ||
552 | # CONFIG_MTD_NAND_ATMEL_ECC_NONE is not set | ||
553 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
554 | # CONFIG_MTD_NAND_PLATFORM is not set | ||
555 | # CONFIG_MTD_ALAUDA is not set | ||
556 | # CONFIG_MTD_ONENAND is not set | ||
557 | |||
558 | # | ||
559 | # LPDDR flash memory drivers | ||
560 | # | ||
561 | # CONFIG_MTD_LPDDR is not set | ||
562 | |||
563 | # | ||
564 | # UBI - Unsorted block images | ||
565 | # | ||
566 | # CONFIG_MTD_UBI is not set | ||
567 | # CONFIG_PARPORT is not set | ||
568 | CONFIG_BLK_DEV=y | ||
569 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
570 | CONFIG_BLK_DEV_LOOP=y | ||
571 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
572 | |||
573 | # | ||
574 | # DRBD disabled because PROC_FS, INET or CONNECTOR not selected | ||
575 | # | ||
576 | # CONFIG_BLK_DEV_NBD is not set | ||
577 | # CONFIG_BLK_DEV_UB is not set | ||
578 | CONFIG_BLK_DEV_RAM=y | ||
579 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
580 | CONFIG_BLK_DEV_RAM_SIZE=8192 | ||
581 | # CONFIG_BLK_DEV_XIP is not set | ||
582 | # CONFIG_CDROM_PKTCDVD is not set | ||
583 | # CONFIG_ATA_OVER_ETH is not set | ||
584 | # CONFIG_MG_DISK is not set | ||
585 | # CONFIG_MISC_DEVICES is not set | ||
586 | CONFIG_HAVE_IDE=y | ||
587 | # CONFIG_IDE is not set | ||
588 | |||
589 | # | ||
590 | # SCSI device support | ||
591 | # | ||
592 | # CONFIG_RAID_ATTRS is not set | ||
593 | CONFIG_SCSI=y | ||
594 | CONFIG_SCSI_DMA=y | ||
595 | # CONFIG_SCSI_TGT is not set | ||
596 | # CONFIG_SCSI_NETLINK is not set | ||
597 | CONFIG_SCSI_PROC_FS=y | ||
598 | |||
599 | # | ||
600 | # SCSI support type (disk, tape, CD-ROM) | ||
601 | # | ||
602 | CONFIG_BLK_DEV_SD=y | ||
603 | # CONFIG_CHR_DEV_ST is not set | ||
604 | # CONFIG_CHR_DEV_OSST is not set | ||
605 | # CONFIG_BLK_DEV_SR is not set | ||
606 | # CONFIG_CHR_DEV_SG is not set | ||
607 | # CONFIG_CHR_DEV_SCH is not set | ||
608 | CONFIG_SCSI_MULTI_LUN=y | ||
609 | # CONFIG_SCSI_CONSTANTS is not set | ||
610 | # CONFIG_SCSI_LOGGING is not set | ||
611 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
612 | CONFIG_SCSI_WAIT_SCAN=m | ||
613 | |||
614 | # | ||
615 | # SCSI Transports | ||
616 | # | ||
617 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
618 | # CONFIG_SCSI_FC_ATTRS is not set | ||
619 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
620 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
621 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
622 | # CONFIG_SCSI_LOWLEVEL is not set | ||
623 | # CONFIG_SCSI_DH is not set | ||
624 | # CONFIG_SCSI_OSD_INITIATOR is not set | ||
625 | # CONFIG_ATA is not set | ||
626 | # CONFIG_MD is not set | ||
627 | CONFIG_NETDEVICES=y | ||
628 | # CONFIG_DUMMY is not set | ||
629 | # CONFIG_BONDING is not set | ||
630 | # CONFIG_MACVLAN is not set | ||
631 | # CONFIG_EQUALIZER is not set | ||
632 | # CONFIG_TUN is not set | ||
633 | # CONFIG_VETH is not set | ||
634 | CONFIG_PHYLIB=y | ||
635 | |||
636 | # | ||
637 | # MII PHY device drivers | ||
638 | # | ||
639 | # CONFIG_MARVELL_PHY is not set | ||
640 | # CONFIG_DAVICOM_PHY is not set | ||
641 | # CONFIG_QSEMI_PHY is not set | ||
642 | # CONFIG_LXT_PHY is not set | ||
643 | # CONFIG_CICADA_PHY is not set | ||
644 | # CONFIG_VITESSE_PHY is not set | ||
645 | # CONFIG_SMSC_PHY is not set | ||
646 | # CONFIG_BROADCOM_PHY is not set | ||
647 | # CONFIG_ICPLUS_PHY is not set | ||
648 | # CONFIG_REALTEK_PHY is not set | ||
649 | # CONFIG_NATIONAL_PHY is not set | ||
650 | # CONFIG_STE10XP is not set | ||
651 | # CONFIG_LSI_ET1011C_PHY is not set | ||
652 | # CONFIG_FIXED_PHY is not set | ||
653 | # CONFIG_MDIO_BITBANG is not set | ||
654 | CONFIG_NET_ETHERNET=y | ||
655 | # CONFIG_MII is not set | ||
656 | CONFIG_MACB=y | ||
657 | # CONFIG_AX88796 is not set | ||
658 | # CONFIG_SMC91X is not set | ||
659 | # CONFIG_DM9000 is not set | ||
660 | # CONFIG_ENC28J60 is not set | ||
661 | # CONFIG_ETHOC is not set | ||
662 | # CONFIG_SMC911X is not set | ||
663 | # CONFIG_SMSC911X is not set | ||
664 | # CONFIG_DNET is not set | ||
665 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
666 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
667 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
668 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
669 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
670 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
671 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
672 | # CONFIG_B44 is not set | ||
673 | # CONFIG_KS8842 is not set | ||
674 | # CONFIG_KS8851 is not set | ||
675 | # CONFIG_KS8851_MLL is not set | ||
676 | # CONFIG_NETDEV_1000 is not set | ||
677 | # CONFIG_NETDEV_10000 is not set | ||
678 | # CONFIG_WLAN is not set | ||
679 | |||
680 | # | ||
681 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
682 | # | ||
683 | |||
684 | # | ||
685 | # USB Network Adapters | ||
686 | # | ||
687 | # CONFIG_USB_CATC is not set | ||
688 | # CONFIG_USB_KAWETH is not set | ||
689 | # CONFIG_USB_PEGASUS is not set | ||
690 | # CONFIG_USB_RTL8150 is not set | ||
691 | # CONFIG_USB_USBNET is not set | ||
692 | # CONFIG_WAN is not set | ||
693 | # CONFIG_PPP is not set | ||
694 | # CONFIG_SLIP is not set | ||
695 | # CONFIG_NETCONSOLE is not set | ||
696 | # CONFIG_NETPOLL is not set | ||
697 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
698 | # CONFIG_ISDN is not set | ||
699 | # CONFIG_PHONE is not set | ||
700 | |||
701 | # | ||
702 | # Input device support | ||
703 | # | ||
704 | CONFIG_INPUT=y | ||
705 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
706 | # CONFIG_INPUT_POLLDEV is not set | ||
707 | # CONFIG_INPUT_SPARSEKMAP is not set | ||
708 | |||
709 | # | ||
710 | # Userland interfaces | ||
711 | # | ||
712 | CONFIG_INPUT_MOUSEDEV=y | ||
713 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
714 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=320 | ||
715 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240 | ||
716 | # CONFIG_INPUT_JOYDEV is not set | ||
717 | # CONFIG_INPUT_EVDEV is not set | ||
718 | # CONFIG_INPUT_EVBUG is not set | ||
719 | |||
720 | # | ||
721 | # Input Device Drivers | ||
722 | # | ||
723 | # CONFIG_INPUT_KEYBOARD is not set | ||
724 | # CONFIG_INPUT_MOUSE is not set | ||
725 | # CONFIG_INPUT_JOYSTICK is not set | ||
726 | # CONFIG_INPUT_TABLET is not set | ||
727 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
728 | # CONFIG_INPUT_MISC is not set | ||
729 | |||
730 | # | ||
731 | # Hardware I/O ports | ||
732 | # | ||
733 | # CONFIG_SERIO is not set | ||
734 | # CONFIG_GAMEPORT is not set | ||
735 | |||
736 | # | ||
737 | # Character devices | ||
738 | # | ||
739 | CONFIG_VT=y | ||
740 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
741 | CONFIG_VT_CONSOLE=y | ||
742 | CONFIG_HW_CONSOLE=y | ||
743 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
744 | CONFIG_DEVKMEM=y | ||
745 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
746 | |||
747 | # | ||
748 | # Serial drivers | ||
749 | # | ||
750 | # CONFIG_SERIAL_8250 is not set | ||
751 | |||
752 | # | ||
753 | # Non-8250 serial port support | ||
754 | # | ||
755 | CONFIG_SERIAL_ATMEL=y | ||
756 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
757 | CONFIG_SERIAL_ATMEL_PDC=y | ||
758 | # CONFIG_SERIAL_ATMEL_TTYAT is not set | ||
759 | # CONFIG_SERIAL_MAX3100 is not set | ||
760 | CONFIG_SERIAL_CORE=y | ||
761 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
762 | # CONFIG_SERIAL_TIMBERDALE is not set | ||
763 | CONFIG_UNIX98_PTYS=y | ||
764 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
765 | # CONFIG_LEGACY_PTYS is not set | ||
766 | # CONFIG_IPMI_HANDLER is not set | ||
767 | # CONFIG_HW_RANDOM is not set | ||
768 | # CONFIG_R3964 is not set | ||
769 | # CONFIG_RAW_DRIVER is not set | ||
770 | # CONFIG_TCG_TPM is not set | ||
771 | CONFIG_I2C=y | ||
772 | CONFIG_I2C_BOARDINFO=y | ||
773 | CONFIG_I2C_COMPAT=y | ||
774 | CONFIG_I2C_CHARDEV=y | ||
775 | CONFIG_I2C_HELPER_AUTO=y | ||
776 | CONFIG_I2C_ALGOBIT=y | ||
777 | |||
778 | # | ||
779 | # I2C Hardware Bus support | ||
780 | # | ||
781 | |||
782 | # | ||
783 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
784 | # | ||
785 | # CONFIG_I2C_DESIGNWARE is not set | ||
786 | CONFIG_I2C_GPIO=y | ||
787 | # CONFIG_I2C_OCORES is not set | ||
788 | # CONFIG_I2C_SIMTEC is not set | ||
789 | # CONFIG_I2C_XILINX is not set | ||
790 | |||
791 | # | ||
792 | # External I2C/SMBus adapter drivers | ||
793 | # | ||
794 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
795 | # CONFIG_I2C_TAOS_EVM is not set | ||
796 | # CONFIG_I2C_TINY_USB is not set | ||
797 | |||
798 | # | ||
799 | # Other I2C/SMBus bus drivers | ||
800 | # | ||
801 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
802 | # CONFIG_I2C_STUB is not set | ||
803 | |||
804 | # | ||
805 | # Miscellaneous I2C Chip support | ||
806 | # | ||
807 | # CONFIG_SENSORS_TSL2550 is not set | ||
808 | # CONFIG_I2C_DEBUG_CORE is not set | ||
809 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
810 | # CONFIG_I2C_DEBUG_BUS is not set | ||
811 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
812 | CONFIG_SPI=y | ||
813 | CONFIG_SPI_MASTER=y | ||
814 | |||
815 | # | ||
816 | # SPI Master Controller Drivers | ||
817 | # | ||
818 | CONFIG_SPI_ATMEL=y | ||
819 | # CONFIG_SPI_BITBANG is not set | ||
820 | # CONFIG_SPI_GPIO is not set | ||
821 | # CONFIG_SPI_XILINX is not set | ||
822 | # CONFIG_SPI_DESIGNWARE is not set | ||
823 | |||
824 | # | ||
825 | # SPI Protocol Masters | ||
826 | # | ||
827 | CONFIG_SPI_SPIDEV=y | ||
828 | # CONFIG_SPI_TLE62X0 is not set | ||
829 | |||
830 | # | ||
831 | # PPS support | ||
832 | # | ||
833 | # CONFIG_PPS is not set | ||
834 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
835 | CONFIG_GPIOLIB=y | ||
836 | CONFIG_GPIO_SYSFS=y | ||
837 | |||
838 | # | ||
839 | # Memory mapped GPIO expanders: | ||
840 | # | ||
841 | # CONFIG_GPIO_IT8761E is not set | ||
842 | |||
843 | # | ||
844 | # I2C GPIO expanders: | ||
845 | # | ||
846 | # CONFIG_GPIO_MAX7300 is not set | ||
847 | # CONFIG_GPIO_MAX732X is not set | ||
848 | # CONFIG_GPIO_PCA953X is not set | ||
849 | # CONFIG_GPIO_PCF857X is not set | ||
850 | # CONFIG_GPIO_ADP5588 is not set | ||
851 | |||
852 | # | ||
853 | # PCI GPIO expanders: | ||
854 | # | ||
855 | |||
856 | # | ||
857 | # SPI GPIO expanders: | ||
858 | # | ||
859 | # CONFIG_GPIO_MAX7301 is not set | ||
860 | # CONFIG_GPIO_MCP23S08 is not set | ||
861 | # CONFIG_GPIO_MC33880 is not set | ||
862 | |||
863 | # | ||
864 | # AC97 GPIO expanders: | ||
865 | # | ||
866 | CONFIG_W1=y | ||
867 | |||
868 | # | ||
869 | # 1-wire Bus Masters | ||
870 | # | ||
871 | # CONFIG_W1_MASTER_DS2490 is not set | ||
872 | # CONFIG_W1_MASTER_DS2482 is not set | ||
873 | # CONFIG_W1_MASTER_DS1WM is not set | ||
874 | CONFIG_W1_MASTER_GPIO=y | ||
875 | |||
876 | # | ||
877 | # 1-wire Slaves | ||
878 | # | ||
879 | CONFIG_W1_SLAVE_THERM=y | ||
880 | # CONFIG_W1_SLAVE_SMEM is not set | ||
881 | CONFIG_W1_SLAVE_DS2431=y | ||
882 | # CONFIG_W1_SLAVE_DS2433 is not set | ||
883 | # CONFIG_W1_SLAVE_DS2760 is not set | ||
884 | # CONFIG_W1_SLAVE_BQ27000 is not set | ||
885 | # CONFIG_POWER_SUPPLY is not set | ||
886 | # CONFIG_HWMON is not set | ||
887 | # CONFIG_THERMAL is not set | ||
888 | CONFIG_WATCHDOG=y | ||
889 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
890 | |||
891 | # | ||
892 | # Watchdog Device Drivers | ||
893 | # | ||
894 | # CONFIG_SOFT_WATCHDOG is not set | ||
895 | # CONFIG_MAX63XX_WATCHDOG is not set | ||
896 | CONFIG_AT91SAM9X_WATCHDOG=y | ||
897 | |||
898 | # | ||
899 | # USB-based Watchdog Cards | ||
900 | # | ||
901 | # CONFIG_USBPCWATCHDOG is not set | ||
902 | CONFIG_SSB_POSSIBLE=y | ||
903 | |||
904 | # | ||
905 | # Sonics Silicon Backplane | ||
906 | # | ||
907 | # CONFIG_SSB is not set | ||
908 | |||
909 | # | ||
910 | # Multifunction device drivers | ||
911 | # | ||
912 | # CONFIG_MFD_CORE is not set | ||
913 | # CONFIG_MFD_88PM860X is not set | ||
914 | # CONFIG_MFD_SM501 is not set | ||
915 | # CONFIG_MFD_ASIC3 is not set | ||
916 | # CONFIG_HTC_EGPIO is not set | ||
917 | # CONFIG_HTC_PASIC3 is not set | ||
918 | # CONFIG_HTC_I2CPLD is not set | ||
919 | # CONFIG_TPS65010 is not set | ||
920 | # CONFIG_TWL4030_CORE is not set | ||
921 | # CONFIG_MFD_TMIO is not set | ||
922 | # CONFIG_MFD_T7L66XB is not set | ||
923 | # CONFIG_MFD_TC6387XB is not set | ||
924 | # CONFIG_MFD_TC6393XB is not set | ||
925 | # CONFIG_PMIC_DA903X is not set | ||
926 | # CONFIG_PMIC_ADP5520 is not set | ||
927 | # CONFIG_MFD_MAX8925 is not set | ||
928 | # CONFIG_MFD_WM8400 is not set | ||
929 | # CONFIG_MFD_WM831X is not set | ||
930 | # CONFIG_MFD_WM8350_I2C is not set | ||
931 | # CONFIG_MFD_WM8994 is not set | ||
932 | # CONFIG_MFD_PCF50633 is not set | ||
933 | # CONFIG_MFD_MC13783 is not set | ||
934 | # CONFIG_AB3100_CORE is not set | ||
935 | # CONFIG_EZX_PCAP is not set | ||
936 | # CONFIG_AB4500_CORE is not set | ||
937 | # CONFIG_REGULATOR is not set | ||
938 | # CONFIG_MEDIA_SUPPORT is not set | ||
939 | |||
940 | # | ||
941 | # Graphics support | ||
942 | # | ||
943 | # CONFIG_VGASTATE is not set | ||
944 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
945 | # CONFIG_FB is not set | ||
946 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
947 | |||
948 | # | ||
949 | # Display device support | ||
950 | # | ||
951 | # CONFIG_DISPLAY_SUPPORT is not set | ||
952 | |||
953 | # | ||
954 | # Console display driver support | ||
955 | # | ||
956 | # CONFIG_VGA_CONSOLE is not set | ||
957 | CONFIG_DUMMY_CONSOLE=y | ||
958 | # CONFIG_SOUND is not set | ||
959 | # CONFIG_HID_SUPPORT is not set | ||
960 | CONFIG_USB_SUPPORT=y | ||
961 | CONFIG_USB_ARCH_HAS_HCD=y | ||
962 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
963 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
964 | CONFIG_USB=y | ||
965 | # CONFIG_USB_DEBUG is not set | ||
966 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
967 | |||
968 | # | ||
969 | # Miscellaneous USB options | ||
970 | # | ||
971 | CONFIG_USB_DEVICEFS=y | ||
972 | # CONFIG_USB_DEVICE_CLASS is not set | ||
973 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
974 | # CONFIG_USB_OTG is not set | ||
975 | CONFIG_USB_MON=y | ||
976 | # CONFIG_USB_WUSB is not set | ||
977 | # CONFIG_USB_WUSB_CBAF is not set | ||
978 | |||
979 | # | ||
980 | # USB Host Controller Drivers | ||
981 | # | ||
982 | # CONFIG_USB_C67X00_HCD is not set | ||
983 | # CONFIG_USB_OXU210HP_HCD is not set | ||
984 | # CONFIG_USB_ISP116X_HCD is not set | ||
985 | # CONFIG_USB_ISP1760_HCD is not set | ||
986 | # CONFIG_USB_ISP1362_HCD is not set | ||
987 | CONFIG_USB_OHCI_HCD=y | ||
988 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | ||
989 | # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set | ||
990 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
991 | # CONFIG_USB_SL811_HCD is not set | ||
992 | # CONFIG_USB_R8A66597_HCD is not set | ||
993 | # CONFIG_USB_HWA_HCD is not set | ||
994 | # CONFIG_USB_MUSB_HDRC is not set | ||
995 | # CONFIG_USB_GADGET_MUSB_HDRC is not set | ||
996 | |||
997 | # | ||
998 | # USB Device Class drivers | ||
999 | # | ||
1000 | # CONFIG_USB_ACM is not set | ||
1001 | # CONFIG_USB_PRINTER is not set | ||
1002 | # CONFIG_USB_WDM is not set | ||
1003 | # CONFIG_USB_TMC is not set | ||
1004 | |||
1005 | # | ||
1006 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may | ||
1007 | # | ||
1008 | |||
1009 | # | ||
1010 | # also be needed; see USB_STORAGE Help for more info | ||
1011 | # | ||
1012 | CONFIG_USB_STORAGE=y | ||
1013 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
1014 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
1015 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
1016 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
1017 | # CONFIG_USB_STORAGE_USBAT is not set | ||
1018 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
1019 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
1020 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
1021 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
1022 | # CONFIG_USB_STORAGE_ONETOUCH is not set | ||
1023 | # CONFIG_USB_STORAGE_KARMA is not set | ||
1024 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
1025 | # CONFIG_USB_LIBUSUAL is not set | ||
1026 | |||
1027 | # | ||
1028 | # USB Imaging devices | ||
1029 | # | ||
1030 | # CONFIG_USB_MDC800 is not set | ||
1031 | # CONFIG_USB_MICROTEK is not set | ||
1032 | |||
1033 | # | ||
1034 | # USB port drivers | ||
1035 | # | ||
1036 | # CONFIG_USB_SERIAL is not set | ||
1037 | |||
1038 | # | ||
1039 | # USB Miscellaneous drivers | ||
1040 | # | ||
1041 | # CONFIG_USB_EMI62 is not set | ||
1042 | # CONFIG_USB_EMI26 is not set | ||
1043 | # CONFIG_USB_ADUTUX is not set | ||
1044 | # CONFIG_USB_SEVSEG is not set | ||
1045 | # CONFIG_USB_RIO500 is not set | ||
1046 | # CONFIG_USB_LEGOTOWER is not set | ||
1047 | # CONFIG_USB_LCD is not set | ||
1048 | # CONFIG_USB_LED is not set | ||
1049 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
1050 | # CONFIG_USB_CYTHERM is not set | ||
1051 | # CONFIG_USB_IDMOUSE is not set | ||
1052 | # CONFIG_USB_FTDI_ELAN is not set | ||
1053 | # CONFIG_USB_APPLEDISPLAY is not set | ||
1054 | # CONFIG_USB_LD is not set | ||
1055 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1056 | # CONFIG_USB_IOWARRIOR is not set | ||
1057 | # CONFIG_USB_TEST is not set | ||
1058 | # CONFIG_USB_ISIGHTFW is not set | ||
1059 | CONFIG_USB_GADGET=m | ||
1060 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | ||
1061 | CONFIG_USB_GADGET_VBUS_DRAW=2 | ||
1062 | CONFIG_USB_GADGET_SELECTED=y | ||
1063 | CONFIG_USB_GADGET_AT91=y | ||
1064 | CONFIG_USB_AT91=m | ||
1065 | # CONFIG_USB_GADGET_ATMEL_USBA is not set | ||
1066 | # CONFIG_USB_GADGET_FSL_USB2 is not set | ||
1067 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
1068 | # CONFIG_USB_GADGET_OMAP is not set | ||
1069 | # CONFIG_USB_GADGET_PXA25X is not set | ||
1070 | # CONFIG_USB_GADGET_R8A66597 is not set | ||
1071 | # CONFIG_USB_GADGET_PXA27X is not set | ||
1072 | # CONFIG_USB_GADGET_S3C_HSOTG is not set | ||
1073 | # CONFIG_USB_GADGET_IMX is not set | ||
1074 | # CONFIG_USB_GADGET_S3C2410 is not set | ||
1075 | # CONFIG_USB_GADGET_M66592 is not set | ||
1076 | # CONFIG_USB_GADGET_AMD5536UDC is not set | ||
1077 | # CONFIG_USB_GADGET_FSL_QE is not set | ||
1078 | # CONFIG_USB_GADGET_CI13XXX is not set | ||
1079 | # CONFIG_USB_GADGET_NET2280 is not set | ||
1080 | # CONFIG_USB_GADGET_GOKU is not set | ||
1081 | # CONFIG_USB_GADGET_LANGWELL is not set | ||
1082 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
1083 | # CONFIG_USB_GADGET_DUALSPEED is not set | ||
1084 | CONFIG_USB_ZERO=m | ||
1085 | # CONFIG_USB_AUDIO is not set | ||
1086 | CONFIG_USB_ETH=m | ||
1087 | CONFIG_USB_ETH_RNDIS=y | ||
1088 | # CONFIG_USB_ETH_EEM is not set | ||
1089 | # CONFIG_USB_GADGETFS is not set | ||
1090 | CONFIG_USB_FILE_STORAGE=m | ||
1091 | # CONFIG_USB_FILE_STORAGE_TEST is not set | ||
1092 | # CONFIG_USB_MASS_STORAGE is not set | ||
1093 | CONFIG_USB_G_SERIAL=m | ||
1094 | # CONFIG_USB_MIDI_GADGET is not set | ||
1095 | # CONFIG_USB_G_PRINTER is not set | ||
1096 | # CONFIG_USB_CDC_COMPOSITE is not set | ||
1097 | # CONFIG_USB_G_NOKIA is not set | ||
1098 | # CONFIG_USB_G_MULTI is not set | ||
1099 | |||
1100 | # | ||
1101 | # OTG and related infrastructure | ||
1102 | # | ||
1103 | # CONFIG_USB_GPIO_VBUS is not set | ||
1104 | # CONFIG_USB_ULPI is not set | ||
1105 | # CONFIG_NOP_USB_XCEIV is not set | ||
1106 | CONFIG_MMC=y | ||
1107 | # CONFIG_MMC_DEBUG is not set | ||
1108 | # CONFIG_MMC_UNSAFE_RESUME is not set | ||
1109 | |||
1110 | # | ||
1111 | # MMC/SD/SDIO Card Drivers | ||
1112 | # | ||
1113 | CONFIG_MMC_BLOCK=y | ||
1114 | CONFIG_MMC_BLOCK_BOUNCE=y | ||
1115 | # CONFIG_SDIO_UART is not set | ||
1116 | # CONFIG_MMC_TEST is not set | ||
1117 | |||
1118 | # | ||
1119 | # MMC/SD/SDIO Host Controller Drivers | ||
1120 | # | ||
1121 | # CONFIG_MMC_SDHCI is not set | ||
1122 | # CONFIG_MMC_AT91 is not set | ||
1123 | CONFIG_MMC_ATMELMCI=y | ||
1124 | # CONFIG_MMC_SPI is not set | ||
1125 | # CONFIG_MEMSTICK is not set | ||
1126 | CONFIG_NEW_LEDS=y | ||
1127 | CONFIG_LEDS_CLASS=y | ||
1128 | |||
1129 | # | ||
1130 | # LED drivers | ||
1131 | # | ||
1132 | # CONFIG_LEDS_PCA9532 is not set | ||
1133 | CONFIG_LEDS_GPIO=y | ||
1134 | CONFIG_LEDS_GPIO_PLATFORM=y | ||
1135 | # CONFIG_LEDS_LP3944 is not set | ||
1136 | # CONFIG_LEDS_PCA955X is not set | ||
1137 | # CONFIG_LEDS_DAC124S085 is not set | ||
1138 | # CONFIG_LEDS_BD2802 is not set | ||
1139 | # CONFIG_LEDS_LT3593 is not set | ||
1140 | |||
1141 | # | ||
1142 | # LED Triggers | ||
1143 | # | ||
1144 | CONFIG_LEDS_TRIGGERS=y | ||
1145 | CONFIG_LEDS_TRIGGER_TIMER=y | ||
1146 | CONFIG_LEDS_TRIGGER_HEARTBEAT=y | ||
1147 | # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set | ||
1148 | # CONFIG_LEDS_TRIGGER_GPIO is not set | ||
1149 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=y | ||
1150 | |||
1151 | # | ||
1152 | # iptables trigger is under Netfilter config (LED target) | ||
1153 | # | ||
1154 | # CONFIG_ACCESSIBILITY is not set | ||
1155 | CONFIG_RTC_LIB=y | ||
1156 | CONFIG_RTC_CLASS=y | ||
1157 | CONFIG_RTC_HCTOSYS=y | ||
1158 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
1159 | # CONFIG_RTC_DEBUG is not set | ||
1160 | |||
1161 | # | ||
1162 | # RTC interfaces | ||
1163 | # | ||
1164 | CONFIG_RTC_INTF_SYSFS=y | ||
1165 | CONFIG_RTC_INTF_PROC=y | ||
1166 | CONFIG_RTC_INTF_DEV=y | ||
1167 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
1168 | # CONFIG_RTC_DRV_TEST is not set | ||
1169 | |||
1170 | # | ||
1171 | # I2C RTC drivers | ||
1172 | # | ||
1173 | # CONFIG_RTC_DRV_DS1307 is not set | ||
1174 | # CONFIG_RTC_DRV_DS1374 is not set | ||
1175 | # CONFIG_RTC_DRV_DS1672 is not set | ||
1176 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
1177 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
1178 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
1179 | # CONFIG_RTC_DRV_X1205 is not set | ||
1180 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
1181 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
1182 | # CONFIG_RTC_DRV_M41T80 is not set | ||
1183 | # CONFIG_RTC_DRV_BQ32K is not set | ||
1184 | # CONFIG_RTC_DRV_S35390A is not set | ||
1185 | # CONFIG_RTC_DRV_FM3130 is not set | ||
1186 | # CONFIG_RTC_DRV_RX8581 is not set | ||
1187 | # CONFIG_RTC_DRV_RX8025 is not set | ||
1188 | |||
1189 | # | ||
1190 | # SPI RTC drivers | ||
1191 | # | ||
1192 | # CONFIG_RTC_DRV_M41T94 is not set | ||
1193 | # CONFIG_RTC_DRV_DS1305 is not set | ||
1194 | # CONFIG_RTC_DRV_DS1390 is not set | ||
1195 | # CONFIG_RTC_DRV_MAX6902 is not set | ||
1196 | # CONFIG_RTC_DRV_R9701 is not set | ||
1197 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
1198 | # CONFIG_RTC_DRV_DS3234 is not set | ||
1199 | # CONFIG_RTC_DRV_PCF2123 is not set | ||
1200 | |||
1201 | # | ||
1202 | # Platform RTC drivers | ||
1203 | # | ||
1204 | # CONFIG_RTC_DRV_CMOS is not set | ||
1205 | # CONFIG_RTC_DRV_DS1286 is not set | ||
1206 | # CONFIG_RTC_DRV_DS1511 is not set | ||
1207 | # CONFIG_RTC_DRV_DS1553 is not set | ||
1208 | # CONFIG_RTC_DRV_DS1742 is not set | ||
1209 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
1210 | # CONFIG_RTC_DRV_M48T86 is not set | ||
1211 | # CONFIG_RTC_DRV_M48T35 is not set | ||
1212 | # CONFIG_RTC_DRV_M48T59 is not set | ||
1213 | # CONFIG_RTC_DRV_MSM6242 is not set | ||
1214 | # CONFIG_RTC_DRV_BQ4802 is not set | ||
1215 | # CONFIG_RTC_DRV_RP5C01 is not set | ||
1216 | # CONFIG_RTC_DRV_V3020 is not set | ||
1217 | |||
1218 | # | ||
1219 | # on-CPU RTC drivers | ||
1220 | # | ||
1221 | CONFIG_RTC_DRV_AT91SAM9=y | ||
1222 | CONFIG_RTC_DRV_AT91SAM9_RTT=0 | ||
1223 | CONFIG_RTC_DRV_AT91SAM9_GPBR=0 | ||
1224 | # CONFIG_DMADEVICES is not set | ||
1225 | # CONFIG_AUXDISPLAY is not set | ||
1226 | # CONFIG_UIO is not set | ||
1227 | |||
1228 | # | ||
1229 | # TI VLYNQ | ||
1230 | # | ||
1231 | # CONFIG_STAGING is not set | ||
1232 | |||
1233 | # | ||
1234 | # File systems | ||
1235 | # | ||
1236 | CONFIG_EXT2_FS=y | ||
1237 | # CONFIG_EXT2_FS_XATTR is not set | ||
1238 | # CONFIG_EXT2_FS_XIP is not set | ||
1239 | CONFIG_EXT3_FS=y | ||
1240 | # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set | ||
1241 | CONFIG_EXT3_FS_XATTR=y | ||
1242 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
1243 | # CONFIG_EXT3_FS_SECURITY is not set | ||
1244 | # CONFIG_EXT4_FS is not set | ||
1245 | CONFIG_JBD=y | ||
1246 | CONFIG_FS_MBCACHE=y | ||
1247 | # CONFIG_REISERFS_FS is not set | ||
1248 | # CONFIG_JFS_FS is not set | ||
1249 | # CONFIG_FS_POSIX_ACL is not set | ||
1250 | # CONFIG_XFS_FS is not set | ||
1251 | # CONFIG_OCFS2_FS is not set | ||
1252 | # CONFIG_BTRFS_FS is not set | ||
1253 | # CONFIG_NILFS2_FS is not set | ||
1254 | CONFIG_FILE_LOCKING=y | ||
1255 | CONFIG_FSNOTIFY=y | ||
1256 | CONFIG_DNOTIFY=y | ||
1257 | CONFIG_INOTIFY=y | ||
1258 | CONFIG_INOTIFY_USER=y | ||
1259 | # CONFIG_QUOTA is not set | ||
1260 | # CONFIG_AUTOFS_FS is not set | ||
1261 | # CONFIG_AUTOFS4_FS is not set | ||
1262 | # CONFIG_FUSE_FS is not set | ||
1263 | |||
1264 | # | ||
1265 | # Caches | ||
1266 | # | ||
1267 | # CONFIG_FSCACHE is not set | ||
1268 | |||
1269 | # | ||
1270 | # CD-ROM/DVD Filesystems | ||
1271 | # | ||
1272 | # CONFIG_ISO9660_FS is not set | ||
1273 | # CONFIG_UDF_FS is not set | ||
1274 | |||
1275 | # | ||
1276 | # DOS/FAT/NT Filesystems | ||
1277 | # | ||
1278 | CONFIG_FAT_FS=y | ||
1279 | # CONFIG_MSDOS_FS is not set | ||
1280 | CONFIG_VFAT_FS=y | ||
1281 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1282 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1283 | # CONFIG_NTFS_FS is not set | ||
1284 | |||
1285 | # | ||
1286 | # Pseudo filesystems | ||
1287 | # | ||
1288 | CONFIG_PROC_FS=y | ||
1289 | CONFIG_PROC_SYSCTL=y | ||
1290 | CONFIG_PROC_PAGE_MONITOR=y | ||
1291 | CONFIG_SYSFS=y | ||
1292 | CONFIG_TMPFS=y | ||
1293 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
1294 | # CONFIG_HUGETLB_PAGE is not set | ||
1295 | # CONFIG_CONFIGFS_FS is not set | ||
1296 | CONFIG_MISC_FILESYSTEMS=y | ||
1297 | # CONFIG_ADFS_FS is not set | ||
1298 | # CONFIG_AFFS_FS is not set | ||
1299 | # CONFIG_HFS_FS is not set | ||
1300 | # CONFIG_HFSPLUS_FS is not set | ||
1301 | # CONFIG_BEFS_FS is not set | ||
1302 | # CONFIG_BFS_FS is not set | ||
1303 | # CONFIG_EFS_FS is not set | ||
1304 | CONFIG_JFFS2_FS=y | ||
1305 | CONFIG_JFFS2_FS_DEBUG=0 | ||
1306 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
1307 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
1308 | CONFIG_JFFS2_SUMMARY=y | ||
1309 | # CONFIG_JFFS2_FS_XATTR is not set | ||
1310 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
1311 | CONFIG_JFFS2_ZLIB=y | ||
1312 | # CONFIG_JFFS2_LZO is not set | ||
1313 | CONFIG_JFFS2_RTIME=y | ||
1314 | # CONFIG_JFFS2_RUBIN is not set | ||
1315 | # CONFIG_LOGFS is not set | ||
1316 | # CONFIG_CRAMFS is not set | ||
1317 | # CONFIG_SQUASHFS is not set | ||
1318 | # CONFIG_VXFS_FS is not set | ||
1319 | # CONFIG_MINIX_FS is not set | ||
1320 | # CONFIG_OMFS_FS is not set | ||
1321 | # CONFIG_HPFS_FS is not set | ||
1322 | # CONFIG_QNX4FS_FS is not set | ||
1323 | # CONFIG_ROMFS_FS is not set | ||
1324 | # CONFIG_SYSV_FS is not set | ||
1325 | # CONFIG_UFS_FS is not set | ||
1326 | CONFIG_NETWORK_FILESYSTEMS=y | ||
1327 | CONFIG_NFS_FS=y | ||
1328 | CONFIG_NFS_V3=y | ||
1329 | # CONFIG_NFS_V3_ACL is not set | ||
1330 | # CONFIG_NFS_V4 is not set | ||
1331 | # CONFIG_NFSD is not set | ||
1332 | CONFIG_LOCKD=y | ||
1333 | CONFIG_LOCKD_V4=y | ||
1334 | CONFIG_NFS_COMMON=y | ||
1335 | CONFIG_SUNRPC=y | ||
1336 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
1337 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1338 | # CONFIG_SMB_FS is not set | ||
1339 | # CONFIG_CIFS is not set | ||
1340 | # CONFIG_NCP_FS is not set | ||
1341 | # CONFIG_CODA_FS is not set | ||
1342 | # CONFIG_AFS_FS is not set | ||
1343 | |||
1344 | # | ||
1345 | # Partition Types | ||
1346 | # | ||
1347 | # CONFIG_PARTITION_ADVANCED is not set | ||
1348 | CONFIG_MSDOS_PARTITION=y | ||
1349 | CONFIG_NLS=y | ||
1350 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1351 | CONFIG_NLS_CODEPAGE_437=y | ||
1352 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1353 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1354 | CONFIG_NLS_CODEPAGE_850=y | ||
1355 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1356 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1357 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1358 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1359 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1360 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1361 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1362 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1363 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1364 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1365 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1366 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1367 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1368 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1369 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1370 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1371 | # CONFIG_NLS_ISO8859_8 is not set | ||
1372 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1373 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1374 | # CONFIG_NLS_ASCII is not set | ||
1375 | CONFIG_NLS_ISO8859_1=y | ||
1376 | # CONFIG_NLS_ISO8859_2 is not set | ||
1377 | # CONFIG_NLS_ISO8859_3 is not set | ||
1378 | # CONFIG_NLS_ISO8859_4 is not set | ||
1379 | # CONFIG_NLS_ISO8859_5 is not set | ||
1380 | # CONFIG_NLS_ISO8859_6 is not set | ||
1381 | # CONFIG_NLS_ISO8859_7 is not set | ||
1382 | # CONFIG_NLS_ISO8859_9 is not set | ||
1383 | # CONFIG_NLS_ISO8859_13 is not set | ||
1384 | # CONFIG_NLS_ISO8859_14 is not set | ||
1385 | CONFIG_NLS_ISO8859_15=y | ||
1386 | # CONFIG_NLS_KOI8_R is not set | ||
1387 | # CONFIG_NLS_KOI8_U is not set | ||
1388 | CONFIG_NLS_UTF8=y | ||
1389 | # CONFIG_DLM is not set | ||
1390 | |||
1391 | # | ||
1392 | # Kernel hacking | ||
1393 | # | ||
1394 | # CONFIG_PRINTK_TIME is not set | ||
1395 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1396 | CONFIG_ENABLE_MUST_CHECK=y | ||
1397 | CONFIG_FRAME_WARN=1024 | ||
1398 | # CONFIG_MAGIC_SYSRQ is not set | ||
1399 | # CONFIG_STRIP_ASM_SYMS is not set | ||
1400 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1401 | # CONFIG_DEBUG_FS is not set | ||
1402 | # CONFIG_HEADERS_CHECK is not set | ||
1403 | # CONFIG_DEBUG_KERNEL is not set | ||
1404 | CONFIG_DEBUG_BUGVERBOSE=y | ||
1405 | CONFIG_DEBUG_MEMORY_INIT=y | ||
1406 | CONFIG_FRAME_POINTER=y | ||
1407 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
1408 | # CONFIG_LATENCYTOP is not set | ||
1409 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
1410 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
1411 | CONFIG_TRACING_SUPPORT=y | ||
1412 | # CONFIG_FTRACE is not set | ||
1413 | # CONFIG_SAMPLES is not set | ||
1414 | CONFIG_HAVE_ARCH_KGDB=y | ||
1415 | # CONFIG_ARM_UNWIND is not set | ||
1416 | # CONFIG_DEBUG_USER is not set | ||
1417 | # CONFIG_OC_ETM is not set | ||
1418 | |||
1419 | # | ||
1420 | # Security options | ||
1421 | # | ||
1422 | # CONFIG_KEYS is not set | ||
1423 | # CONFIG_SECURITY is not set | ||
1424 | # CONFIG_SECURITYFS is not set | ||
1425 | # CONFIG_DEFAULT_SECURITY_SELINUX is not set | ||
1426 | # CONFIG_DEFAULT_SECURITY_SMACK is not set | ||
1427 | # CONFIG_DEFAULT_SECURITY_TOMOYO is not set | ||
1428 | CONFIG_DEFAULT_SECURITY_DAC=y | ||
1429 | CONFIG_DEFAULT_SECURITY="" | ||
1430 | # CONFIG_CRYPTO is not set | ||
1431 | # CONFIG_BINARY_PRINTF is not set | ||
1432 | |||
1433 | # | ||
1434 | # Library routines | ||
1435 | # | ||
1436 | CONFIG_BITREVERSE=y | ||
1437 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
1438 | # CONFIG_CRC_CCITT is not set | ||
1439 | # CONFIG_CRC16 is not set | ||
1440 | # CONFIG_CRC_T10DIF is not set | ||
1441 | # CONFIG_CRC_ITU_T is not set | ||
1442 | CONFIG_CRC32=y | ||
1443 | # CONFIG_CRC7 is not set | ||
1444 | # CONFIG_LIBCRC32C is not set | ||
1445 | CONFIG_ZLIB_INFLATE=y | ||
1446 | CONFIG_ZLIB_DEFLATE=y | ||
1447 | CONFIG_LZO_DECOMPRESS=y | ||
1448 | CONFIG_DECOMPRESS_GZIP=y | ||
1449 | CONFIG_DECOMPRESS_BZIP2=y | ||
1450 | CONFIG_DECOMPRESS_LZMA=y | ||
1451 | CONFIG_DECOMPRESS_LZO=y | ||
1452 | CONFIG_HAS_IOMEM=y | ||
1453 | CONFIG_HAS_IOPORT=y | ||
1454 | CONFIG_HAS_DMA=y | ||
1455 | CONFIG_NLATTR=y | ||
1456 | CONFIG_GENERIC_ATOMIC64=y | ||
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index cdb9022716fd..6bcba48800fe 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -21,6 +21,9 @@ | |||
21 | #define __ASM_ARM_HARDWARE_L2X0_H | 21 | #define __ASM_ARM_HARDWARE_L2X0_H |
22 | 22 | ||
23 | #define L2X0_CACHE_ID 0x000 | 23 | #define L2X0_CACHE_ID 0x000 |
24 | #define L2X0_CACHE_ID_PART_MASK (0xf << 6) | ||
25 | #define L2X0_CACHE_ID_PART_L210 (1 << 6) | ||
26 | #define L2X0_CACHE_ID_PART_L310 (3 << 6) | ||
24 | #define L2X0_CACHE_TYPE 0x004 | 27 | #define L2X0_CACHE_TYPE 0x004 |
25 | #define L2X0_CTRL 0x100 | 28 | #define L2X0_CTRL 0x100 |
26 | #define L2X0_AUX_CTRL 0x104 | 29 | #define L2X0_AUX_CTRL 0x104 |
diff --git a/arch/arm/include/asm/hardware/pl330.h b/arch/arm/include/asm/hardware/pl330.h new file mode 100644 index 000000000000..575fa8186ca0 --- /dev/null +++ b/arch/arm/include/asm/hardware/pl330.h | |||
@@ -0,0 +1,217 @@ | |||
1 | /* linux/include/asm/hardware/pl330.h | ||
2 | * | ||
3 | * Copyright (C) 2010 Samsung Electronics Co. Ltd. | ||
4 | * Jaswinder Singh <jassi.brar@samsung.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __PL330_CORE_H | ||
22 | #define __PL330_CORE_H | ||
23 | |||
24 | #define PL330_MAX_CHAN 8 | ||
25 | #define PL330_MAX_IRQS 32 | ||
26 | #define PL330_MAX_PERI 32 | ||
27 | |||
28 | enum pl330_srccachectrl { | ||
29 | SCCTRL0 = 0, /* Noncacheable and nonbufferable */ | ||
30 | SCCTRL1, /* Bufferable only */ | ||
31 | SCCTRL2, /* Cacheable, but do not allocate */ | ||
32 | SCCTRL3, /* Cacheable and bufferable, but do not allocate */ | ||
33 | SINVALID1, | ||
34 | SINVALID2, | ||
35 | SCCTRL6, /* Cacheable write-through, allocate on reads only */ | ||
36 | SCCTRL7, /* Cacheable write-back, allocate on reads only */ | ||
37 | }; | ||
38 | |||
39 | enum pl330_dstcachectrl { | ||
40 | DCCTRL0 = 0, /* Noncacheable and nonbufferable */ | ||
41 | DCCTRL1, /* Bufferable only */ | ||
42 | DCCTRL2, /* Cacheable, but do not allocate */ | ||
43 | DCCTRL3, /* Cacheable and bufferable, but do not allocate */ | ||
44 | DINVALID1 = 8, | ||
45 | DINVALID2, | ||
46 | DCCTRL6, /* Cacheable write-through, allocate on writes only */ | ||
47 | DCCTRL7, /* Cacheable write-back, allocate on writes only */ | ||
48 | }; | ||
49 | |||
50 | /* Populated by the PL330 core driver for DMA API driver's info */ | ||
51 | struct pl330_config { | ||
52 | u32 periph_id; | ||
53 | u32 pcell_id; | ||
54 | #define DMAC_MODE_NS (1 << 0) | ||
55 | unsigned int mode; | ||
56 | unsigned int data_bus_width:10; /* In number of bits */ | ||
57 | unsigned int data_buf_dep:10; | ||
58 | unsigned int num_chan:4; | ||
59 | unsigned int num_peri:6; | ||
60 | u32 peri_ns; | ||
61 | unsigned int num_events:6; | ||
62 | u32 irq_ns; | ||
63 | }; | ||
64 | |||
65 | /* Handle to the DMAC provided to the PL330 core */ | ||
66 | struct pl330_info { | ||
67 | /* Owning device */ | ||
68 | struct device *dev; | ||
69 | /* Size of MicroCode buffers for each channel. */ | ||
70 | unsigned mcbufsz; | ||
71 | /* ioremap'ed address of PL330 registers. */ | ||
72 | void __iomem *base; | ||
73 | /* Client can freely use it. */ | ||
74 | void *client_data; | ||
75 | /* PL330 core data, Client must not touch it. */ | ||
76 | void *pl330_data; | ||
77 | /* Populated by the PL330 core driver during pl330_add */ | ||
78 | struct pl330_config pcfg; | ||
79 | /* | ||
80 | * If the DMAC has some reset mechanism, then the | ||
81 | * client may want to provide pointer to the method. | ||
82 | */ | ||
83 | void (*dmac_reset)(struct pl330_info *pi); | ||
84 | }; | ||
85 | |||
86 | enum pl330_byteswap { | ||
87 | SWAP_NO = 0, | ||
88 | SWAP_2, | ||
89 | SWAP_4, | ||
90 | SWAP_8, | ||
91 | SWAP_16, | ||
92 | }; | ||
93 | |||
94 | /** | ||
95 | * Request Configuration. | ||
96 | * The PL330 core does not modify this and uses the last | ||
97 | * working configuration if the request doesn't provide any. | ||
98 | * | ||
99 | * The Client may want to provide this info only for the | ||
100 | * first request and a request with new settings. | ||
101 | */ | ||
102 | struct pl330_reqcfg { | ||
103 | /* Address Incrementing */ | ||
104 | unsigned dst_inc:1; | ||
105 | unsigned src_inc:1; | ||
106 | |||
107 | /* | ||
108 | * For now, the SRC & DST protection levels | ||
109 | * and burst size/length are assumed same. | ||
110 | */ | ||
111 | bool nonsecure; | ||
112 | bool privileged; | ||
113 | bool insnaccess; | ||
114 | unsigned brst_len:5; | ||
115 | unsigned brst_size:3; /* in power of 2 */ | ||
116 | |||
117 | enum pl330_dstcachectrl dcctl; | ||
118 | enum pl330_srccachectrl scctl; | ||
119 | enum pl330_byteswap swap; | ||
120 | }; | ||
121 | |||
122 | /* | ||
123 | * One cycle of DMAC operation. | ||
124 | * There may be more than one xfer in a request. | ||
125 | */ | ||
126 | struct pl330_xfer { | ||
127 | u32 src_addr; | ||
128 | u32 dst_addr; | ||
129 | /* Size to xfer */ | ||
130 | u32 bytes; | ||
131 | /* | ||
132 | * Pointer to next xfer in the list. | ||
133 | * The last xfer in the req must point to NULL. | ||
134 | */ | ||
135 | struct pl330_xfer *next; | ||
136 | }; | ||
137 | |||
138 | /* The xfer callbacks are made with one of these arguments. */ | ||
139 | enum pl330_op_err { | ||
140 | /* The all xfers in the request were success. */ | ||
141 | PL330_ERR_NONE, | ||
142 | /* If req aborted due to global error. */ | ||
143 | PL330_ERR_ABORT, | ||
144 | /* If req failed due to problem with Channel. */ | ||
145 | PL330_ERR_FAIL, | ||
146 | }; | ||
147 | |||
148 | enum pl330_reqtype { | ||
149 | MEMTOMEM, | ||
150 | MEMTODEV, | ||
151 | DEVTOMEM, | ||
152 | DEVTODEV, | ||
153 | }; | ||
154 | |||
155 | /* A request defining Scatter-Gather List ending with NULL xfer. */ | ||
156 | struct pl330_req { | ||
157 | enum pl330_reqtype rqtype; | ||
158 | /* Index of peripheral for the xfer. */ | ||
159 | unsigned peri:5; | ||
160 | /* Unique token for this xfer, set by the client. */ | ||
161 | void *token; | ||
162 | /* Callback to be called after xfer. */ | ||
163 | void (*xfer_cb)(void *token, enum pl330_op_err err); | ||
164 | /* If NULL, req will be done at last set parameters. */ | ||
165 | struct pl330_reqcfg *cfg; | ||
166 | /* Pointer to first xfer in the request. */ | ||
167 | struct pl330_xfer *x; | ||
168 | }; | ||
169 | |||
170 | /* | ||
171 | * To know the status of the channel and DMAC, the client | ||
172 | * provides a pointer to this structure. The PL330 core | ||
173 | * fills it with current information. | ||
174 | */ | ||
175 | struct pl330_chanstatus { | ||
176 | /* | ||
177 | * If the DMAC engine halted due to some error, | ||
178 | * the client should remove-add DMAC. | ||
179 | */ | ||
180 | bool dmac_halted; | ||
181 | /* | ||
182 | * If channel is halted due to some error, | ||
183 | * the client should ABORT/FLUSH and START the channel. | ||
184 | */ | ||
185 | bool faulting; | ||
186 | /* Location of last load */ | ||
187 | u32 src_addr; | ||
188 | /* Location of last store */ | ||
189 | u32 dst_addr; | ||
190 | /* | ||
191 | * Pointer to the currently active req, NULL if channel is | ||
192 | * inactive, even though the requests may be present. | ||
193 | */ | ||
194 | struct pl330_req *top_req; | ||
195 | /* Pointer to req waiting second in the queue if any. */ | ||
196 | struct pl330_req *wait_req; | ||
197 | }; | ||
198 | |||
199 | enum pl330_chan_op { | ||
200 | /* Start the channel */ | ||
201 | PL330_OP_START, | ||
202 | /* Abort the active xfer */ | ||
203 | PL330_OP_ABORT, | ||
204 | /* Stop xfer and flush queue */ | ||
205 | PL330_OP_FLUSH, | ||
206 | }; | ||
207 | |||
208 | extern int pl330_add(struct pl330_info *); | ||
209 | extern void pl330_del(struct pl330_info *pi); | ||
210 | extern int pl330_update(const struct pl330_info *pi); | ||
211 | extern void pl330_release_channel(void *ch_id); | ||
212 | extern void *pl330_request_channel(const struct pl330_info *pi); | ||
213 | extern int pl330_chan_status(void *ch_id, struct pl330_chanstatus *pstatus); | ||
214 | extern int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op); | ||
215 | extern int pl330_submit_req(void *ch_id, struct pl330_req *r); | ||
216 | |||
217 | #endif /* __PL330_CORE_H */ | ||
diff --git a/arch/arm/include/asm/hardware/sp810.h b/arch/arm/include/asm/hardware/sp810.h new file mode 100644 index 000000000000..a101f10bb5b1 --- /dev/null +++ b/arch/arm/include/asm/hardware/sp810.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/hardware/sp810.h | ||
3 | * | ||
4 | * ARM PrimeXsys System Controller SP810 header file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARM_SP810_H | ||
15 | #define __ASM_ARM_SP810_H | ||
16 | |||
17 | #include <linux/io.h> | ||
18 | |||
19 | /* sysctl registers offset */ | ||
20 | #define SCCTRL 0x000 | ||
21 | #define SCSYSSTAT 0x004 | ||
22 | #define SCIMCTRL 0x008 | ||
23 | #define SCIMSTAT 0x00C | ||
24 | #define SCXTALCTRL 0x010 | ||
25 | #define SCPLLCTRL 0x014 | ||
26 | #define SCPLLFCTRL 0x018 | ||
27 | #define SCPERCTRL0 0x01C | ||
28 | #define SCPERCTRL1 0x020 | ||
29 | #define SCPEREN 0x024 | ||
30 | #define SCPERDIS 0x028 | ||
31 | #define SCPERCLKEN 0x02C | ||
32 | #define SCPERSTAT 0x030 | ||
33 | #define SCSYSID0 0xEE0 | ||
34 | #define SCSYSID1 0xEE4 | ||
35 | #define SCSYSID2 0xEE8 | ||
36 | #define SCSYSID3 0xEEC | ||
37 | #define SCITCR 0xF00 | ||
38 | #define SCITIR0 0xF04 | ||
39 | #define SCITIR1 0xF08 | ||
40 | #define SCITOR 0xF0C | ||
41 | #define SCCNTCTRL 0xF10 | ||
42 | #define SCCNTDATA 0xF14 | ||
43 | #define SCCNTSTEP 0xF18 | ||
44 | #define SCPERIPHID0 0xFE0 | ||
45 | #define SCPERIPHID1 0xFE4 | ||
46 | #define SCPERIPHID2 0xFE8 | ||
47 | #define SCPERIPHID3 0xFEC | ||
48 | #define SCPCELLID0 0xFF0 | ||
49 | #define SCPCELLID1 0xFF4 | ||
50 | #define SCPCELLID2 0xFF8 | ||
51 | #define SCPCELLID3 0xFFC | ||
52 | |||
53 | static inline void sysctl_soft_reset(void __iomem *base) | ||
54 | { | ||
55 | /* writing any value to SCSYSSTAT reg will reset system */ | ||
56 | writel(0, base + SCSYSSTAT); | ||
57 | } | ||
58 | |||
59 | #endif /* __ASM_ARM_SP810_H */ | ||
diff --git a/arch/arm/include/asm/ioctls.h b/arch/arm/include/asm/ioctls.h index a91d8a1523cf..7f0b6d13296a 100644 --- a/arch/arm/include/asm/ioctls.h +++ b/arch/arm/include/asm/ioctls.h | |||
@@ -53,6 +53,9 @@ | |||
53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | 53 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ |
54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | 54 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ |
55 | 55 | ||
56 | #define TIOCGRS485 0x542E | ||
57 | #define TIOCSRS485 0x542F | ||
58 | |||
56 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | 59 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ |
57 | #define FIOCLEX 0x5451 | 60 | #define FIOCLEX 0x5451 |
58 | #define FIOASYNC 0x5452 | 61 | #define FIOASYNC 0x5452 |
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index a38bdc7afa34..52f0da1e97df 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -8,10 +8,16 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #ifndef __ASM_MACH_PCI_H | ||
12 | #define __ASM_MACH_PCI_H | ||
13 | |||
11 | struct pci_sys_data; | 14 | struct pci_sys_data; |
12 | struct pci_bus; | 15 | struct pci_bus; |
13 | 16 | ||
14 | struct hw_pci { | 17 | struct hw_pci { |
18 | #ifdef CONFIG_PCI_DOMAINS | ||
19 | int domain; | ||
20 | #endif | ||
15 | struct list_head buses; | 21 | struct list_head buses; |
16 | int nr_controllers; | 22 | int nr_controllers; |
17 | int (*setup)(int nr, struct pci_sys_data *); | 23 | int (*setup)(int nr, struct pci_sys_data *); |
@@ -26,6 +32,9 @@ struct hw_pci { | |||
26 | * Per-controller structure | 32 | * Per-controller structure |
27 | */ | 33 | */ |
28 | struct pci_sys_data { | 34 | struct pci_sys_data { |
35 | #ifdef CONFIG_PCI_DOMAINS | ||
36 | int domain; | ||
37 | #endif | ||
29 | struct list_head node; | 38 | struct list_head node; |
30 | int busnr; /* primary bus number */ | 39 | int busnr; /* primary bus number */ |
31 | u64 mem_offset; /* bus->cpu memory mapping offset */ | 40 | u64 mem_offset; /* bus->cpu memory mapping offset */ |
@@ -70,3 +79,5 @@ extern int pci_v3_setup(int nr, struct pci_sys_data *); | |||
70 | extern struct pci_bus *pci_v3_scan_bus(int nr, struct pci_sys_data *); | 79 | extern struct pci_bus *pci_v3_scan_bus(int nr, struct pci_sys_data *); |
71 | extern void pci_v3_preinit(void); | 80 | extern void pci_v3_preinit(void); |
72 | extern void pci_v3_postinit(void); | 81 | extern void pci_v3_postinit(void); |
82 | |||
83 | #endif /* __ASM_MACH_PCI_H */ | ||
diff --git a/arch/arm/include/asm/mach/time.h b/arch/arm/include/asm/mach/time.h index 8bffc3ff3acf..35d408f6dccf 100644 --- a/arch/arm/include/asm/mach/time.h +++ b/arch/arm/include/asm/mach/time.h | |||
@@ -38,7 +38,7 @@ struct sys_timer { | |||
38 | void (*init)(void); | 38 | void (*init)(void); |
39 | void (*suspend)(void); | 39 | void (*suspend)(void); |
40 | void (*resume)(void); | 40 | void (*resume)(void); |
41 | #ifndef CONFIG_GENERIC_TIME | 41 | #ifdef CONFIG_ARCH_USES_GETTIMEOFFSET |
42 | unsigned long (*offset)(void); | 42 | unsigned long (*offset)(void); |
43 | #endif | 43 | #endif |
44 | }; | 44 | }; |
diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h index 47980118d0a5..92e2a833693d 100644 --- a/arch/arm/include/asm/pci.h +++ b/arch/arm/include/asm/pci.h | |||
@@ -4,8 +4,23 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | #include <asm-generic/pci-dma-compat.h> | 5 | #include <asm-generic/pci-dma-compat.h> |
6 | 6 | ||
7 | #include <asm/mach/pci.h> /* for pci_sys_data */ | ||
7 | #include <mach/hardware.h> /* for PCIBIOS_MIN_* */ | 8 | #include <mach/hardware.h> /* for PCIBIOS_MIN_* */ |
8 | 9 | ||
10 | #ifdef CONFIG_PCI_DOMAINS | ||
11 | static inline int pci_domain_nr(struct pci_bus *bus) | ||
12 | { | ||
13 | struct pci_sys_data *root = bus->sysdata; | ||
14 | |||
15 | return root->domain; | ||
16 | } | ||
17 | |||
18 | static inline int pci_proc_domain(struct pci_bus *bus) | ||
19 | { | ||
20 | return pci_domain_nr(bus); | ||
21 | } | ||
22 | #endif /* CONFIG_PCI_DOMAINS */ | ||
23 | |||
9 | #ifdef CONFIG_PCI_HOST_ITE8152 | 24 | #ifdef CONFIG_PCI_HOST_ITE8152 |
10 | /* ITE bridge requires setting latency timer to avoid early bus access | 25 | /* ITE bridge requires setting latency timer to avoid early bus access |
11 | termination by PIC bus mater devices | 26 | termination by PIC bus mater devices |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 11397687f42c..ab68cf1ef80f 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -314,7 +314,7 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; } | |||
314 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED) | 314 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED) |
315 | #define pgprot_writecombine(prot) \ | 315 | #define pgprot_writecombine(prot) \ |
316 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE) | 316 | __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE) |
317 | #if __LINUX_ARM_ARCH__ >= 7 | 317 | #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE |
318 | #define pgprot_dmacoherent(prot) \ | 318 | #define pgprot_dmacoherent(prot) \ |
319 | __pgprot_modify(prot, L_PTE_MT_MASK|L_PTE_EXEC, L_PTE_MT_BUFFERABLE) | 319 | __pgprot_modify(prot, L_PTE_MT_MASK|L_PTE_EXEC, L_PTE_MT_BUFFERABLE) |
320 | #else | 320 | #else |
diff --git a/arch/arm/include/asm/scatterlist.h b/arch/arm/include/asm/scatterlist.h index ca0a37d03400..bcda59f39941 100644 --- a/arch/arm/include/asm/scatterlist.h +++ b/arch/arm/include/asm/scatterlist.h | |||
@@ -4,24 +4,8 @@ | |||
4 | #include <asm/memory.h> | 4 | #include <asm/memory.h> |
5 | #include <asm/types.h> | 5 | #include <asm/types.h> |
6 | 6 | ||
7 | struct scatterlist { | 7 | #include <asm-generic/scatterlist.h> |
8 | #ifdef CONFIG_DEBUG_SG | ||
9 | unsigned long sg_magic; | ||
10 | #endif | ||
11 | unsigned long page_link; | ||
12 | unsigned int offset; /* buffer offset */ | ||
13 | dma_addr_t dma_address; /* dma address */ | ||
14 | unsigned int length; /* length */ | ||
15 | }; | ||
16 | 8 | ||
17 | /* | 9 | #undef ARCH_HAS_SG_CHAIN |
18 | * These macros should be used after a pci_map_sg call has been done | ||
19 | * to get bus addresses of each of the SG entries and their lengths. | ||
20 | * You should only work with the number of sg entries pci_map_sg | ||
21 | * returns, or alternatively stop on the first sg_dma_len(sg) which | ||
22 | * is 0. | ||
23 | */ | ||
24 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
25 | #define sg_dma_len(sg) ((sg)->length) | ||
26 | 10 | ||
27 | #endif /* _ASMARM_SCATTERLIST_H */ | 11 | #endif /* _ASMARM_SCATTERLIST_H */ |
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index e0d763be1846..3d05190797cb 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -82,7 +82,7 @@ struct secondary_data { | |||
82 | extern struct secondary_data secondary_data; | 82 | extern struct secondary_data secondary_data; |
83 | 83 | ||
84 | extern int __cpu_disable(void); | 84 | extern int __cpu_disable(void); |
85 | extern int mach_cpu_disable(unsigned int cpu); | 85 | extern int platform_cpu_disable(unsigned int cpu); |
86 | 86 | ||
87 | extern void __cpu_die(unsigned int cpu); | 87 | extern void __cpu_die(unsigned int cpu); |
88 | extern void cpu_die(void); | 88 | extern void cpu_die(void); |
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index ca88e6a84707..02f5d99adbc0 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -137,7 +137,7 @@ extern unsigned int user_debug; | |||
137 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | 137 | #define dmb() __asm__ __volatile__ ("" : : : "memory") |
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | #if __LINUX_ARM_ARCH__ >= 7 || defined(CONFIG_SMP) | 140 | #if defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) |
141 | #define mb() dmb() | 141 | #define mb() dmb() |
142 | #define rmb() dmb() | 142 | #define rmb() dmb() |
143 | #define wmb() dmb() | 143 | #define wmb() dmb() |
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index bd397e0b663e..c6273a3bfc25 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -527,6 +527,9 @@ static void __init pcibios_init_hw(struct hw_pci *hw) | |||
527 | if (!sys) | 527 | if (!sys) |
528 | panic("PCI: unable to allocate sys data!"); | 528 | panic("PCI: unable to allocate sys data!"); |
529 | 529 | ||
530 | #ifdef CONFIG_PCI_DOMAINS | ||
531 | sys->domain = hw->domain; | ||
532 | #endif | ||
530 | sys->hw = hw; | 533 | sys->hw = hw; |
531 | sys->busnr = busnr; | 534 | sys->busnr = busnr; |
532 | sys->swizzle = hw->swizzle; | 535 | sys->swizzle = hw->swizzle; |
diff --git a/arch/arm/kernel/dma.c b/arch/arm/kernel/dma.c index 7d5b9fb01e71..2c4a185f92cd 100644 --- a/arch/arm/kernel/dma.c +++ b/arch/arm/kernel/dma.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/scatterlist.h> | 18 | #include <linux/scatterlist.h> |
19 | #include <linux/seq_file.h> | ||
20 | #include <linux/proc_fs.h> | ||
19 | 21 | ||
20 | #include <asm/dma.h> | 22 | #include <asm/dma.h> |
21 | 23 | ||
@@ -264,3 +266,37 @@ int get_dma_residue(unsigned int chan) | |||
264 | return ret; | 266 | return ret; |
265 | } | 267 | } |
266 | EXPORT_SYMBOL(get_dma_residue); | 268 | EXPORT_SYMBOL(get_dma_residue); |
269 | |||
270 | #ifdef CONFIG_PROC_FS | ||
271 | static int proc_dma_show(struct seq_file *m, void *v) | ||
272 | { | ||
273 | int i; | ||
274 | |||
275 | for (i = 0 ; i < MAX_DMA_CHANNELS ; i++) { | ||
276 | dma_t *dma = dma_channel(i); | ||
277 | if (dma && dma->lock) | ||
278 | seq_printf(m, "%2d: %s\n", i, dma->device_id); | ||
279 | } | ||
280 | return 0; | ||
281 | } | ||
282 | |||
283 | static int proc_dma_open(struct inode *inode, struct file *file) | ||
284 | { | ||
285 | return single_open(file, proc_dma_show, NULL); | ||
286 | } | ||
287 | |||
288 | static const struct file_operations proc_dma_operations = { | ||
289 | .open = proc_dma_open, | ||
290 | .read = seq_read, | ||
291 | .llseek = seq_lseek, | ||
292 | .release = single_release, | ||
293 | }; | ||
294 | |||
295 | static int __init proc_dma_init(void) | ||
296 | { | ||
297 | proc_create("dma", 0, NULL, &proc_dma_operations); | ||
298 | return 0; | ||
299 | } | ||
300 | |||
301 | __initcall(proc_dma_init); | ||
302 | #endif | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 577543f3857f..7a3cc0266934 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -162,7 +162,7 @@ int __cpu_disable(void) | |||
162 | struct task_struct *p; | 162 | struct task_struct *p; |
163 | int ret; | 163 | int ret; |
164 | 164 | ||
165 | ret = mach_cpu_disable(cpu); | 165 | ret = platform_cpu_disable(cpu); |
166 | if (ret) | 166 | if (ret) |
167 | return ret; | 167 | return ret; |
168 | 168 | ||
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 28753805d2d1..38c261f9951c 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -72,12 +72,15 @@ unsigned long profile_pc(struct pt_regs *regs) | |||
72 | EXPORT_SYMBOL(profile_pc); | 72 | EXPORT_SYMBOL(profile_pc); |
73 | #endif | 73 | #endif |
74 | 74 | ||
75 | #ifndef CONFIG_GENERIC_TIME | 75 | #ifdef CONFIG_ARCH_USES_GETTIMEOFFSET |
76 | static unsigned long dummy_gettimeoffset(void) | 76 | u32 arch_gettimeoffset(void) |
77 | { | 77 | { |
78 | if (system_timer->offset != NULL) | ||
79 | return system_timer->offset() * 1000; | ||
80 | |||
78 | return 0; | 81 | return 0; |
79 | } | 82 | } |
80 | #endif | 83 | #endif /* CONFIG_ARCH_USES_GETTIMEOFFSET */ |
81 | 84 | ||
82 | #ifdef CONFIG_LEDS_TIMER | 85 | #ifdef CONFIG_LEDS_TIMER |
83 | static inline void do_leds(void) | 86 | static inline void do_leds(void) |
@@ -93,63 +96,6 @@ static inline void do_leds(void) | |||
93 | #define do_leds() | 96 | #define do_leds() |
94 | #endif | 97 | #endif |
95 | 98 | ||
96 | #ifndef CONFIG_GENERIC_TIME | ||
97 | void do_gettimeofday(struct timeval *tv) | ||
98 | { | ||
99 | unsigned long flags; | ||
100 | unsigned long seq; | ||
101 | unsigned long usec, sec; | ||
102 | |||
103 | do { | ||
104 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | ||
105 | usec = system_timer->offset(); | ||
106 | sec = xtime.tv_sec; | ||
107 | usec += xtime.tv_nsec / 1000; | ||
108 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); | ||
109 | |||
110 | /* usec may have gone up a lot: be safe */ | ||
111 | while (usec >= 1000000) { | ||
112 | usec -= 1000000; | ||
113 | sec++; | ||
114 | } | ||
115 | |||
116 | tv->tv_sec = sec; | ||
117 | tv->tv_usec = usec; | ||
118 | } | ||
119 | |||
120 | EXPORT_SYMBOL(do_gettimeofday); | ||
121 | |||
122 | int do_settimeofday(struct timespec *tv) | ||
123 | { | ||
124 | time_t wtm_sec, sec = tv->tv_sec; | ||
125 | long wtm_nsec, nsec = tv->tv_nsec; | ||
126 | |||
127 | if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) | ||
128 | return -EINVAL; | ||
129 | |||
130 | write_seqlock_irq(&xtime_lock); | ||
131 | /* | ||
132 | * This is revolting. We need to set "xtime" correctly. However, the | ||
133 | * value in this location is the value at the most recent update of | ||
134 | * wall time. Discover what correction gettimeofday() would have | ||
135 | * done, and then undo it! | ||
136 | */ | ||
137 | nsec -= system_timer->offset() * NSEC_PER_USEC; | ||
138 | |||
139 | wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); | ||
140 | wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); | ||
141 | |||
142 | set_normalized_timespec(&xtime, sec, nsec); | ||
143 | set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec); | ||
144 | |||
145 | ntp_clear(); | ||
146 | write_sequnlock_irq(&xtime_lock); | ||
147 | clock_was_set(); | ||
148 | return 0; | ||
149 | } | ||
150 | |||
151 | EXPORT_SYMBOL(do_settimeofday); | ||
152 | #endif /* !CONFIG_GENERIC_TIME */ | ||
153 | 99 | ||
154 | #ifndef CONFIG_GENERIC_CLOCKEVENTS | 100 | #ifndef CONFIG_GENERIC_CLOCKEVENTS |
155 | /* | 101 | /* |
@@ -214,10 +160,6 @@ device_initcall(timer_init_sysfs); | |||
214 | 160 | ||
215 | void __init time_init(void) | 161 | void __init time_init(void) |
216 | { | 162 | { |
217 | #ifndef CONFIG_GENERIC_TIME | ||
218 | if (system_timer->offset == NULL) | ||
219 | system_timer->offset = dummy_gettimeoffset; | ||
220 | #endif | ||
221 | system_timer->init(); | 163 | system_timer->init(); |
222 | } | 164 | } |
223 | 165 | ||
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 2db43a5ddd9b..103976411a67 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -97,6 +97,7 @@ config ARCH_AT572D940HF | |||
97 | 97 | ||
98 | config ARCH_AT91X40 | 98 | config ARCH_AT91X40 |
99 | bool "AT91x40" | 99 | bool "AT91x40" |
100 | select ARCH_USES_GETTIMEOFFSET | ||
100 | 101 | ||
101 | endchoice | 102 | endchoice |
102 | 103 | ||
@@ -360,6 +361,19 @@ config MACH_CPU9G20 | |||
360 | Select this if you are using a Eukrea Electromatique's | 361 | Select this if you are using a Eukrea Electromatique's |
361 | CPU9G20 Board <http://www.eukrea.com/> | 362 | CPU9G20 Board <http://www.eukrea.com/> |
362 | 363 | ||
364 | config MACH_PORTUXG20 | ||
365 | bool "taskit PortuxG20" | ||
366 | help | ||
367 | Select this if you are using taskit's PortuxG20. | ||
368 | <http://www.taskit.de/en/> | ||
369 | |||
370 | config MACH_STAMP9G20 | ||
371 | bool "taskit Stamp9G20 CPU module" | ||
372 | help | ||
373 | Select this if you are using taskit's Stamp9G20 CPU module on its | ||
374 | evaluation board. | ||
375 | <http://www.taskit.de/en/> | ||
376 | |||
363 | endif | 377 | endif |
364 | 378 | ||
365 | # ---------------------------------------------------------- | 379 | # ---------------------------------------------------------- |
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index 027dd570dcc3..1df9ee1ba040 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -63,6 +63,8 @@ obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o | |||
63 | obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o | 63 | obj-$(CONFIG_MACH_AT91SAM9G20EK) += board-sam9g20ek.o |
64 | obj-$(CONFIG_MACH_AT91SAM9G20EK_2MMC) += board-sam9g20ek-2slot-mmc.o | 64 | obj-$(CONFIG_MACH_AT91SAM9G20EK_2MMC) += board-sam9g20ek-2slot-mmc.o |
65 | obj-$(CONFIG_MACH_CPU9G20) += board-cpu9krea.o | 65 | obj-$(CONFIG_MACH_CPU9G20) += board-cpu9krea.o |
66 | obj-$(CONFIG_MACH_STAMP9G20) += board-stamp9g20.o | ||
67 | obj-$(CONFIG_MACH_PORTUXG20) += board-stamp9g20.o | ||
66 | 68 | ||
67 | # AT91SAM9G45 board-specific support | 69 | # AT91SAM9G45 board-specific support |
68 | obj-$(CONFIG_MACH_AT91SAM9G45EKES) += board-sam9m10g45ek.o | 70 | obj-$(CONFIG_MACH_AT91SAM9G45EKES) += board-sam9m10g45ek.o |
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c new file mode 100644 index 000000000000..87958274290f --- /dev/null +++ b/arch/arm/mach-at91/board-stamp9g20.c | |||
@@ -0,0 +1,315 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Christian Glindkamp <christian.glindkamp@taskit.de> | ||
3 | * taskit GmbH | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #include <linux/mm.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/gpio.h> | ||
23 | #include <linux/w1-gpio.h> | ||
24 | |||
25 | #include <asm/mach-types.h> | ||
26 | #include <asm/mach/arch.h> | ||
27 | |||
28 | #include <mach/board.h> | ||
29 | #include <mach/at91sam9_smc.h> | ||
30 | |||
31 | #include "sam9_smc.h" | ||
32 | #include "generic.h" | ||
33 | |||
34 | |||
35 | static void __init portuxg20_map_io(void) | ||
36 | { | ||
37 | /* Initialize processor: 18.432 MHz crystal */ | ||
38 | at91sam9260_initialize(18432000); | ||
39 | |||
40 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
41 | at91_register_uart(0, 0, 0); | ||
42 | |||
43 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
44 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
45 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
46 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
47 | |||
48 | /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */ | ||
49 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
50 | |||
51 | /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */ | ||
52 | at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
53 | |||
54 | /* USART4 on ttyS5. (Rx, Tx only) */ | ||
55 | at91_register_uart(AT91SAM9260_ID_US4, 5, 0); | ||
56 | |||
57 | /* USART5 on ttyS6. (Rx, Tx only) */ | ||
58 | at91_register_uart(AT91SAM9260_ID_US5, 6, 0); | ||
59 | |||
60 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
61 | at91_set_serial_console(0); | ||
62 | } | ||
63 | |||
64 | static void __init stamp9g20_map_io(void) | ||
65 | { | ||
66 | /* Initialize processor: 18.432 MHz crystal */ | ||
67 | at91sam9260_initialize(18432000); | ||
68 | |||
69 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
70 | at91_register_uart(0, 0, 0); | ||
71 | |||
72 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
73 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
74 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ||
75 | | ATMEL_UART_DCD | ATMEL_UART_RI); | ||
76 | |||
77 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
78 | at91_set_serial_console(0); | ||
79 | } | ||
80 | |||
81 | static void __init init_irq(void) | ||
82 | { | ||
83 | at91sam9260_init_interrupts(NULL); | ||
84 | } | ||
85 | |||
86 | |||
87 | /* | ||
88 | * NAND flash | ||
89 | */ | ||
90 | static struct atmel_nand_data __initdata nand_data = { | ||
91 | .ale = 21, | ||
92 | .cle = 22, | ||
93 | .rdy_pin = AT91_PIN_PC13, | ||
94 | .enable_pin = AT91_PIN_PC14, | ||
95 | .bus_width_16 = 0, | ||
96 | }; | ||
97 | |||
98 | static struct sam9_smc_config __initdata nand_smc_config = { | ||
99 | .ncs_read_setup = 0, | ||
100 | .nrd_setup = 2, | ||
101 | .ncs_write_setup = 0, | ||
102 | .nwe_setup = 2, | ||
103 | |||
104 | .ncs_read_pulse = 4, | ||
105 | .nrd_pulse = 4, | ||
106 | .ncs_write_pulse = 4, | ||
107 | .nwe_pulse = 4, | ||
108 | |||
109 | .read_cycle = 7, | ||
110 | .write_cycle = 7, | ||
111 | |||
112 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8, | ||
113 | .tdf_cycles = 3, | ||
114 | }; | ||
115 | |||
116 | static void __init add_device_nand(void) | ||
117 | { | ||
118 | /* configure chip-select 3 (NAND) */ | ||
119 | sam9_smc_configure(3, &nand_smc_config); | ||
120 | |||
121 | at91_add_device_nand(&nand_data); | ||
122 | } | ||
123 | |||
124 | |||
125 | /* | ||
126 | * MCI (SD/MMC) | ||
127 | * det_pin, wp_pin and vcc_pin are not connected | ||
128 | */ | ||
129 | #if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE) | ||
130 | static struct mci_platform_data __initdata mmc_data = { | ||
131 | .slot[0] = { | ||
132 | .bus_width = 4, | ||
133 | }, | ||
134 | }; | ||
135 | #else | ||
136 | static struct at91_mmc_data __initdata mmc_data = { | ||
137 | .slot_b = 0, | ||
138 | .wire4 = 1, | ||
139 | }; | ||
140 | #endif | ||
141 | |||
142 | |||
143 | /* | ||
144 | * USB Host port | ||
145 | */ | ||
146 | static struct at91_usbh_data __initdata usbh_data = { | ||
147 | .ports = 2, | ||
148 | }; | ||
149 | |||
150 | |||
151 | /* | ||
152 | * USB Device port | ||
153 | */ | ||
154 | static struct at91_udc_data __initdata portuxg20_udc_data = { | ||
155 | .vbus_pin = AT91_PIN_PC7, | ||
156 | .pullup_pin = 0, /* pull-up driven by UDC */ | ||
157 | }; | ||
158 | |||
159 | static struct at91_udc_data __initdata stamp9g20_udc_data = { | ||
160 | .vbus_pin = AT91_PIN_PA22, | ||
161 | .pullup_pin = 0, /* pull-up driven by UDC */ | ||
162 | }; | ||
163 | |||
164 | |||
165 | /* | ||
166 | * MACB Ethernet device | ||
167 | */ | ||
168 | static struct at91_eth_data __initdata macb_data = { | ||
169 | .phy_irq_pin = AT91_PIN_PA28, | ||
170 | .is_rmii = 1, | ||
171 | }; | ||
172 | |||
173 | |||
174 | /* | ||
175 | * LEDs | ||
176 | */ | ||
177 | static struct gpio_led portuxg20_leds[] = { | ||
178 | { | ||
179 | .name = "LED2", | ||
180 | .gpio = AT91_PIN_PC5, | ||
181 | .default_trigger = "none", | ||
182 | }, { | ||
183 | .name = "LED3", | ||
184 | .gpio = AT91_PIN_PC4, | ||
185 | .default_trigger = "none", | ||
186 | }, { | ||
187 | .name = "LED4", | ||
188 | .gpio = AT91_PIN_PC10, | ||
189 | .default_trigger = "heartbeat", | ||
190 | } | ||
191 | }; | ||
192 | |||
193 | static struct gpio_led stamp9g20_leds[] = { | ||
194 | { | ||
195 | .name = "D8", | ||
196 | .gpio = AT91_PIN_PB18, | ||
197 | .active_low = 1, | ||
198 | .default_trigger = "none", | ||
199 | }, { | ||
200 | .name = "D9", | ||
201 | .gpio = AT91_PIN_PB19, | ||
202 | .active_low = 1, | ||
203 | .default_trigger = "none", | ||
204 | }, { | ||
205 | .name = "D10", | ||
206 | .gpio = AT91_PIN_PB20, | ||
207 | .active_low = 1, | ||
208 | .default_trigger = "heartbeat", | ||
209 | } | ||
210 | }; | ||
211 | |||
212 | |||
213 | /* | ||
214 | * SPI devices | ||
215 | */ | ||
216 | static struct spi_board_info portuxg20_spi_devices[] = { | ||
217 | { | ||
218 | .modalias = "spidev", | ||
219 | .chip_select = 0, | ||
220 | .max_speed_hz = 1 * 1000 * 1000, | ||
221 | .bus_num = 0, | ||
222 | }, { | ||
223 | .modalias = "spidev", | ||
224 | .chip_select = 0, | ||
225 | .max_speed_hz = 1 * 1000 * 1000, | ||
226 | .bus_num = 1, | ||
227 | }, | ||
228 | }; | ||
229 | |||
230 | |||
231 | /* | ||
232 | * Dallas 1-Wire | ||
233 | */ | ||
234 | static struct w1_gpio_platform_data w1_gpio_pdata = { | ||
235 | .pin = AT91_PIN_PA29, | ||
236 | .is_open_drain = 1, | ||
237 | }; | ||
238 | |||
239 | static struct platform_device w1_device = { | ||
240 | .name = "w1-gpio", | ||
241 | .id = -1, | ||
242 | .dev.platform_data = &w1_gpio_pdata, | ||
243 | }; | ||
244 | |||
245 | void add_w1(void) | ||
246 | { | ||
247 | at91_set_GPIO_periph(w1_gpio_pdata.pin, 1); | ||
248 | at91_set_multi_drive(w1_gpio_pdata.pin, 1); | ||
249 | platform_device_register(&w1_device); | ||
250 | } | ||
251 | |||
252 | |||
253 | static void __init generic_board_init(void) | ||
254 | { | ||
255 | /* Serial */ | ||
256 | at91_add_device_serial(); | ||
257 | /* NAND */ | ||
258 | add_device_nand(); | ||
259 | /* MMC */ | ||
260 | #if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE) | ||
261 | at91_add_device_mci(0, &mmc_data); | ||
262 | #else | ||
263 | at91_add_device_mmc(0, &mmc_data); | ||
264 | #endif | ||
265 | /* USB Host */ | ||
266 | at91_add_device_usbh(&usbh_data); | ||
267 | /* Ethernet */ | ||
268 | at91_add_device_eth(&macb_data); | ||
269 | /* I2C */ | ||
270 | at91_add_device_i2c(NULL, 0); | ||
271 | /* W1 */ | ||
272 | add_w1(); | ||
273 | } | ||
274 | |||
275 | static void __init portuxg20_board_init(void) | ||
276 | { | ||
277 | generic_board_init(); | ||
278 | /* SPI */ | ||
279 | at91_add_device_spi(portuxg20_spi_devices, ARRAY_SIZE(portuxg20_spi_devices)); | ||
280 | /* USB Device */ | ||
281 | at91_add_device_udc(&portuxg20_udc_data); | ||
282 | /* LEDs */ | ||
283 | at91_gpio_leds(portuxg20_leds, ARRAY_SIZE(portuxg20_leds)); | ||
284 | } | ||
285 | |||
286 | static void __init stamp9g20_board_init(void) | ||
287 | { | ||
288 | generic_board_init(); | ||
289 | /* USB Device */ | ||
290 | at91_add_device_udc(&stamp9g20_udc_data); | ||
291 | /* LEDs */ | ||
292 | at91_gpio_leds(stamp9g20_leds, ARRAY_SIZE(stamp9g20_leds)); | ||
293 | } | ||
294 | |||
295 | MACHINE_START(PORTUXG20, "taskit PortuxG20") | ||
296 | /* Maintainer: taskit GmbH */ | ||
297 | .phys_io = AT91_BASE_SYS, | ||
298 | .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, | ||
299 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
300 | .timer = &at91sam926x_timer, | ||
301 | .map_io = portuxg20_map_io, | ||
302 | .init_irq = init_irq, | ||
303 | .init_machine = portuxg20_board_init, | ||
304 | MACHINE_END | ||
305 | |||
306 | MACHINE_START(STAMP9G20, "taskit Stamp9G20") | ||
307 | /* Maintainer: taskit GmbH */ | ||
308 | .phys_io = AT91_BASE_SYS, | ||
309 | .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, | ||
310 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
311 | .timer = &at91sam926x_timer, | ||
312 | .map_io = stamp9g20_map_io, | ||
313 | .init_irq = init_irq, | ||
314 | .init_machine = stamp9g20_board_init, | ||
315 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index ceaec6c16eb2..df2ed848c9f8 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/usb/atmel_usba_udc.h> | 39 | #include <linux/usb/atmel_usba_udc.h> |
40 | #include <linux/atmel-mci.h> | 40 | #include <linux/atmel-mci.h> |
41 | #include <sound/atmel-ac97c.h> | 41 | #include <sound/atmel-ac97c.h> |
42 | #include <linux/serial.h> | ||
42 | 43 | ||
43 | /* USB Device */ | 44 | /* USB Device */ |
44 | struct at91_udc_data { | 45 | struct at91_udc_data { |
@@ -143,9 +144,10 @@ extern struct platform_device *atmel_default_console_device; | |||
143 | extern void __init __deprecated at91_init_serial(struct at91_uart_config *config); | 144 | extern void __init __deprecated at91_init_serial(struct at91_uart_config *config); |
144 | 145 | ||
145 | struct atmel_uart_data { | 146 | struct atmel_uart_data { |
146 | short use_dma_tx; /* use transmit DMA? */ | 147 | short use_dma_tx; /* use transmit DMA? */ |
147 | short use_dma_rx; /* use receive DMA? */ | 148 | short use_dma_rx; /* use receive DMA? */ |
148 | void __iomem *regs; /* virtual base address, if any */ | 149 | void __iomem *regs; /* virt. base address, if any */ |
150 | struct serial_rs485 rs485; /* rs485 settings */ | ||
149 | }; | 151 | }; |
150 | extern void __init at91_add_device_serial(void); | 152 | extern void __init at91_add_device_serial(void); |
151 | 153 | ||
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index 5a0650101d45..833659d1200a 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #define ARCH_ID_AT91SAM9260 0x019803a0 | 21 | #define ARCH_ID_AT91SAM9260 0x019803a0 |
22 | #define ARCH_ID_AT91SAM9261 0x019703a0 | 22 | #define ARCH_ID_AT91SAM9261 0x019703a0 |
23 | #define ARCH_ID_AT91SAM9263 0x019607a0 | 23 | #define ARCH_ID_AT91SAM9263 0x019607a0 |
24 | #define ARCH_ID_AT91SAM9G10 0x819903a0 | 24 | #define ARCH_ID_AT91SAM9G10 0x019903a0 |
25 | #define ARCH_ID_AT91SAM9G20 0x019905a0 | 25 | #define ARCH_ID_AT91SAM9G20 0x019905a0 |
26 | #define ARCH_ID_AT91SAM9RL64 0x019b03a0 | 26 | #define ARCH_ID_AT91SAM9RL64 0x019b03a0 |
27 | #define ARCH_ID_AT91SAM9G45 0x819b05a0 | 27 | #define ARCH_ID_AT91SAM9G45 0x819b05a0 |
@@ -108,7 +108,7 @@ static inline unsigned long at91cap9_rev_identify(void) | |||
108 | #endif | 108 | #endif |
109 | 109 | ||
110 | #ifdef CONFIG_ARCH_AT91SAM9G10 | 110 | #ifdef CONFIG_ARCH_AT91SAM9G10 |
111 | #define cpu_is_at91sam9g10() (at91_cpu_identify() == ARCH_ID_AT91SAM9G10) | 111 | #define cpu_is_at91sam9g10() ((at91_cpu_identify() & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) |
112 | #else | 112 | #else |
113 | #define cpu_is_at91sam9g10() (0) | 113 | #define cpu_is_at91sam9g10() (0) |
114 | #endif | 114 | #endif |
diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h index 5268af3933c2..c80e090b3670 100644 --- a/arch/arm/mach-at91/include/mach/system.h +++ b/arch/arm/mach-at91/include/mach/system.h | |||
@@ -24,21 +24,24 @@ | |||
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <mach/at91_st.h> | 25 | #include <mach/at91_st.h> |
26 | #include <mach/at91_dbgu.h> | 26 | #include <mach/at91_dbgu.h> |
27 | #include <mach/at91_pmc.h> | ||
27 | 28 | ||
28 | static inline void arch_idle(void) | 29 | static inline void arch_idle(void) |
29 | { | 30 | { |
31 | #ifndef CONFIG_DEBUG_KERNEL | ||
30 | /* | 32 | /* |
31 | * Disable the processor clock. The processor will be automatically | 33 | * Disable the processor clock. The processor will be automatically |
32 | * re-enabled by an interrupt or by a reset. | 34 | * re-enabled by an interrupt or by a reset. |
33 | */ | 35 | */ |
34 | // at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); | 36 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); |
35 | 37 | #else | |
36 | /* | 38 | /* |
37 | * Set the processor (CP15) into 'Wait for Interrupt' mode. | 39 | * Set the processor (CP15) into 'Wait for Interrupt' mode. |
38 | * Unlike disabling the processor clock via the PMC (above) | 40 | * Unlike disabling the processor clock via the PMC (above) |
39 | * this allows the processor to be woken via JTAG. | 41 | * this allows the processor to be woken via JTAG. |
40 | */ | 42 | */ |
41 | cpu_do_idle(); | 43 | cpu_do_idle(); |
44 | #endif | ||
42 | } | 45 | } |
43 | 46 | ||
44 | void (*at91_arch_reset)(void); | 47 | void (*at91_arch_reset)(void); |
diff --git a/arch/arm/mach-bcmring/arch.c b/arch/arm/mach-bcmring/arch.c index 53dd2a9eecf9..2f139196d63d 100644 --- a/arch/arm/mach-bcmring/arch.c +++ b/arch/arm/mach-bcmring/arch.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/setup.h> | 29 | #include <asm/setup.h> |
30 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
31 | #include <asm/mach/time.h> | 31 | #include <asm/mach/time.h> |
32 | #include <asm/pmu.h> | ||
32 | 33 | ||
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
34 | #include <mach/dma.h> | 35 | #include <mach/dma.h> |
@@ -85,8 +86,23 @@ static struct platform_device nand_device = { | |||
85 | .num_resources = ARRAY_SIZE(nand_resource), | 86 | .num_resources = ARRAY_SIZE(nand_resource), |
86 | }; | 87 | }; |
87 | 88 | ||
89 | static struct resource pmu_resource = { | ||
90 | .start = IRQ_PMUIRQ, | ||
91 | .end = IRQ_PMUIRQ, | ||
92 | .flags = IORESOURCE_IRQ, | ||
93 | }; | ||
94 | |||
95 | static struct platform_device pmu_device = { | ||
96 | .name = "arm-pmu", | ||
97 | .id = ARM_PMU_DEVICE_CPU, | ||
98 | .resource = &pmu_resource, | ||
99 | .num_resources = 1, | ||
100 | }; | ||
101 | |||
102 | |||
88 | static struct platform_device *devices[] __initdata = { | 103 | static struct platform_device *devices[] __initdata = { |
89 | &nand_device, | 104 | &nand_device, |
105 | &pmu_device, | ||
90 | }; | 106 | }; |
91 | 107 | ||
92 | /**************************************************************************** | 108 | /**************************************************************************** |
diff --git a/arch/arm/mach-clps711x/mm.c b/arch/arm/mach-clps711x/mm.c index a7b4591205a3..986592176767 100644 --- a/arch/arm/mach-clps711x/mm.c +++ b/arch/arm/mach-clps711x/mm.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/bootmem.h> | ||
26 | 25 | ||
27 | #include <asm/sizes.h> | 26 | #include <asm/sizes.h> |
28 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c index caf6d5154aec..3a1a855bfdca 100644 --- a/arch/arm/mach-ep93xx/adssphere.c +++ b/arch/arm/mach-ep93xx/adssphere.c | |||
@@ -41,7 +41,7 @@ static struct platform_device adssphere_flash = { | |||
41 | .resource = &adssphere_flash_resource, | 41 | .resource = &adssphere_flash_resource, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | static struct ep93xx_eth_data adssphere_eth_data = { | 44 | static struct ep93xx_eth_data __initdata adssphere_eth_data = { |
45 | .phy_id = 1, | 45 | .phy_id = 1, |
46 | }; | 46 | }; |
47 | 47 | ||
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index 5f80092b6ace..e29bdef9b2e2 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c | |||
@@ -96,6 +96,10 @@ static struct clk clk_keypad = { | |||
96 | .enable_mask = EP93XX_SYSCON_KEYTCHCLKDIV_KEN, | 96 | .enable_mask = EP93XX_SYSCON_KEYTCHCLKDIV_KEN, |
97 | .set_rate = set_keytchclk_rate, | 97 | .set_rate = set_keytchclk_rate, |
98 | }; | 98 | }; |
99 | static struct clk clk_spi = { | ||
100 | .parent = &clk_xtali, | ||
101 | .rate = EP93XX_EXT_CLK_RATE, | ||
102 | }; | ||
99 | static struct clk clk_pwm = { | 103 | static struct clk clk_pwm = { |
100 | .parent = &clk_xtali, | 104 | .parent = &clk_xtali, |
101 | .rate = EP93XX_EXT_CLK_RATE, | 105 | .rate = EP93XX_EXT_CLK_RATE, |
@@ -186,6 +190,7 @@ static struct clk_lookup clocks[] = { | |||
186 | INIT_CK("ep93xx-ohci", NULL, &clk_usb_host), | 190 | INIT_CK("ep93xx-ohci", NULL, &clk_usb_host), |
187 | INIT_CK("ep93xx-keypad", NULL, &clk_keypad), | 191 | INIT_CK("ep93xx-keypad", NULL, &clk_keypad), |
188 | INIT_CK("ep93xx-fb", NULL, &clk_video), | 192 | INIT_CK("ep93xx-fb", NULL, &clk_video), |
193 | INIT_CK("ep93xx-spi.0", NULL, &clk_spi), | ||
189 | INIT_CK(NULL, "pwm_clk", &clk_pwm), | 194 | INIT_CK(NULL, "pwm_clk", &clk_pwm), |
190 | INIT_CK(NULL, "m2p0", &clk_m2p0), | 195 | INIT_CK(NULL, "m2p0", &clk_m2p0), |
191 | INIT_CK(NULL, "m2p1", &clk_m2p1), | 196 | INIT_CK(NULL, "m2p1", &clk_m2p1), |
@@ -473,6 +478,14 @@ static int __init ep93xx_clock_init(void) | |||
473 | /* Initialize the pll2 derived clocks */ | 478 | /* Initialize the pll2 derived clocks */ |
474 | clk_usb_host.rate = clk_pll2.rate / (((value >> 28) & 0xf) + 1); | 479 | clk_usb_host.rate = clk_pll2.rate / (((value >> 28) & 0xf) + 1); |
475 | 480 | ||
481 | /* | ||
482 | * EP93xx SSP clock rate was doubled in version E2. For more information | ||
483 | * see: | ||
484 | * http://www.cirrus.com/en/pubs/appNote/AN273REV4.pdf | ||
485 | */ | ||
486 | if (ep93xx_chip_revision() < EP93XX_CHIP_REV_E2) | ||
487 | clk_spi.rate /= 2; | ||
488 | |||
476 | pr_info("PLL1 running at %ld MHz, PLL2 at %ld MHz\n", | 489 | pr_info("PLL1 running at %ld MHz, PLL2 at %ld MHz\n", |
477 | clk_pll1.rate / 1000000, clk_pll2.rate / 1000000); | 490 | clk_pll1.rate / 1000000, clk_pll2.rate / 1000000); |
478 | pr_info("FCLK %ld MHz, HCLK %ld MHz, PCLK %ld MHz\n", | 491 | pr_info("FCLK %ld MHz, HCLK %ld MHz, PCLK %ld MHz\n", |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 90fb591cbffa..9092677f63eb 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -31,10 +31,12 @@ | |||
31 | #include <linux/amba/serial.h> | 31 | #include <linux/amba/serial.h> |
32 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
33 | #include <linux/i2c-gpio.h> | 33 | #include <linux/i2c-gpio.h> |
34 | #include <linux/spi/spi.h> | ||
34 | 35 | ||
35 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
36 | #include <mach/fb.h> | 37 | #include <mach/fb.h> |
37 | #include <mach/ep93xx_keypad.h> | 38 | #include <mach/ep93xx_keypad.h> |
39 | #include <mach/ep93xx_spi.h> | ||
38 | 40 | ||
39 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
40 | #include <asm/mach/time.h> | 42 | #include <asm/mach/time.h> |
@@ -222,6 +224,20 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits) | |||
222 | } | 224 | } |
223 | EXPORT_SYMBOL(ep93xx_devcfg_set_clear); | 225 | EXPORT_SYMBOL(ep93xx_devcfg_set_clear); |
224 | 226 | ||
227 | /** | ||
228 | * ep93xx_chip_revision() - returns the EP93xx chip revision | ||
229 | * | ||
230 | * See <mach/platform.h> for more information. | ||
231 | */ | ||
232 | unsigned int ep93xx_chip_revision(void) | ||
233 | { | ||
234 | unsigned int v; | ||
235 | |||
236 | v = __raw_readl(EP93XX_SYSCON_SYSCFG); | ||
237 | v &= EP93XX_SYSCON_SYSCFG_REV_MASK; | ||
238 | v >>= EP93XX_SYSCON_SYSCFG_REV_SHIFT; | ||
239 | return v; | ||
240 | } | ||
225 | 241 | ||
226 | /************************************************************************* | 242 | /************************************************************************* |
227 | * EP93xx peripheral handling | 243 | * EP93xx peripheral handling |
@@ -330,6 +346,10 @@ static struct platform_device ep93xx_ohci_device = { | |||
330 | .resource = ep93xx_ohci_resources, | 346 | .resource = ep93xx_ohci_resources, |
331 | }; | 347 | }; |
332 | 348 | ||
349 | |||
350 | /************************************************************************* | ||
351 | * EP93xx ethernet peripheral handling | ||
352 | *************************************************************************/ | ||
333 | static struct ep93xx_eth_data ep93xx_eth_data; | 353 | static struct ep93xx_eth_data ep93xx_eth_data; |
334 | 354 | ||
335 | static struct resource ep93xx_eth_resource[] = { | 355 | static struct resource ep93xx_eth_resource[] = { |
@@ -354,6 +374,12 @@ static struct platform_device ep93xx_eth_device = { | |||
354 | .resource = ep93xx_eth_resource, | 374 | .resource = ep93xx_eth_resource, |
355 | }; | 375 | }; |
356 | 376 | ||
377 | /** | ||
378 | * ep93xx_register_eth - Register the built-in ethernet platform device. | ||
379 | * @data: platform specific ethernet configuration (__initdata) | ||
380 | * @copy_addr: flag indicating that the MAC address should be copied | ||
381 | * from the IndAd registers (as programmed by the bootloader) | ||
382 | */ | ||
357 | void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr) | 383 | void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr) |
358 | { | 384 | { |
359 | if (copy_addr) | 385 | if (copy_addr) |
@@ -370,11 +396,19 @@ void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr) | |||
370 | static struct i2c_gpio_platform_data ep93xx_i2c_data; | 396 | static struct i2c_gpio_platform_data ep93xx_i2c_data; |
371 | 397 | ||
372 | static struct platform_device ep93xx_i2c_device = { | 398 | static struct platform_device ep93xx_i2c_device = { |
373 | .name = "i2c-gpio", | 399 | .name = "i2c-gpio", |
374 | .id = 0, | 400 | .id = 0, |
375 | .dev.platform_data = &ep93xx_i2c_data, | 401 | .dev = { |
402 | .platform_data = &ep93xx_i2c_data, | ||
403 | }, | ||
376 | }; | 404 | }; |
377 | 405 | ||
406 | /** | ||
407 | * ep93xx_register_i2c - Register the i2c platform device. | ||
408 | * @data: platform specific i2c-gpio configuration (__initdata) | ||
409 | * @devices: platform specific i2c bus device information (__initdata) | ||
410 | * @num: the number of devices on the i2c bus | ||
411 | */ | ||
378 | void __init ep93xx_register_i2c(struct i2c_gpio_platform_data *data, | 412 | void __init ep93xx_register_i2c(struct i2c_gpio_platform_data *data, |
379 | struct i2c_board_info *devices, int num) | 413 | struct i2c_board_info *devices, int num) |
380 | { | 414 | { |
@@ -398,17 +432,67 @@ void __init ep93xx_register_i2c(struct i2c_gpio_platform_data *data, | |||
398 | platform_device_register(&ep93xx_i2c_device); | 432 | platform_device_register(&ep93xx_i2c_device); |
399 | } | 433 | } |
400 | 434 | ||
435 | /************************************************************************* | ||
436 | * EP93xx SPI peripheral handling | ||
437 | *************************************************************************/ | ||
438 | static struct ep93xx_spi_info ep93xx_spi_master_data; | ||
439 | |||
440 | static struct resource ep93xx_spi_resources[] = { | ||
441 | { | ||
442 | .start = EP93XX_SPI_PHYS_BASE, | ||
443 | .end = EP93XX_SPI_PHYS_BASE + 0x18 - 1, | ||
444 | .flags = IORESOURCE_MEM, | ||
445 | }, | ||
446 | { | ||
447 | .start = IRQ_EP93XX_SSP, | ||
448 | .end = IRQ_EP93XX_SSP, | ||
449 | .flags = IORESOURCE_IRQ, | ||
450 | }, | ||
451 | }; | ||
452 | |||
453 | static struct platform_device ep93xx_spi_device = { | ||
454 | .name = "ep93xx-spi", | ||
455 | .id = 0, | ||
456 | .dev = { | ||
457 | .platform_data = &ep93xx_spi_master_data, | ||
458 | }, | ||
459 | .num_resources = ARRAY_SIZE(ep93xx_spi_resources), | ||
460 | .resource = ep93xx_spi_resources, | ||
461 | }; | ||
462 | |||
463 | /** | ||
464 | * ep93xx_register_spi() - registers spi platform device | ||
465 | * @info: ep93xx board specific spi master info (__initdata) | ||
466 | * @devices: SPI devices to register (__initdata) | ||
467 | * @num: number of SPI devices to register | ||
468 | * | ||
469 | * This function registers platform device for the EP93xx SPI controller and | ||
470 | * also makes sure that SPI pins are muxed so that I2S is not using those pins. | ||
471 | */ | ||
472 | void __init ep93xx_register_spi(struct ep93xx_spi_info *info, | ||
473 | struct spi_board_info *devices, int num) | ||
474 | { | ||
475 | /* | ||
476 | * When SPI is used, we need to make sure that I2S is muxed off from | ||
477 | * SPI pins. | ||
478 | */ | ||
479 | ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_I2SONSSP); | ||
480 | |||
481 | ep93xx_spi_master_data = *info; | ||
482 | spi_register_board_info(devices, num); | ||
483 | platform_device_register(&ep93xx_spi_device); | ||
484 | } | ||
401 | 485 | ||
402 | /************************************************************************* | 486 | /************************************************************************* |
403 | * EP93xx LEDs | 487 | * EP93xx LEDs |
404 | *************************************************************************/ | 488 | *************************************************************************/ |
405 | static struct gpio_led ep93xx_led_pins[] = { | 489 | static struct gpio_led ep93xx_led_pins[] = { |
406 | { | 490 | { |
407 | .name = "platform:grled", | 491 | .name = "platform:grled", |
408 | .gpio = EP93XX_GPIO_LINE_GRLED, | 492 | .gpio = EP93XX_GPIO_LINE_GRLED, |
409 | }, { | 493 | }, { |
410 | .name = "platform:rdled", | 494 | .name = "platform:rdled", |
411 | .gpio = EP93XX_GPIO_LINE_RDLED, | 495 | .gpio = EP93XX_GPIO_LINE_RDLED, |
412 | }, | 496 | }, |
413 | }; | 497 | }; |
414 | 498 | ||
@@ -528,7 +612,7 @@ static struct platform_device ep93xx_fb_device = { | |||
528 | .name = "ep93xx-fb", | 612 | .name = "ep93xx-fb", |
529 | .id = -1, | 613 | .id = -1, |
530 | .dev = { | 614 | .dev = { |
531 | .platform_data = &ep93xxfb_data, | 615 | .platform_data = &ep93xxfb_data, |
532 | .coherent_dma_mask = DMA_BIT_MASK(32), | 616 | .coherent_dma_mask = DMA_BIT_MASK(32), |
533 | .dma_mask = &ep93xx_fb_device.dev.coherent_dma_mask, | 617 | .dma_mask = &ep93xx_fb_device.dev.coherent_dma_mask, |
534 | }, | 618 | }, |
@@ -536,6 +620,10 @@ static struct platform_device ep93xx_fb_device = { | |||
536 | .resource = ep93xx_fb_resource, | 620 | .resource = ep93xx_fb_resource, |
537 | }; | 621 | }; |
538 | 622 | ||
623 | /** | ||
624 | * ep93xx_register_fb - Register the framebuffer platform device. | ||
625 | * @data: platform specific framebuffer configuration (__initdata) | ||
626 | */ | ||
539 | void __init ep93xx_register_fb(struct ep93xxfb_mach_info *data) | 627 | void __init ep93xx_register_fb(struct ep93xxfb_mach_info *data) |
540 | { | 628 | { |
541 | ep93xxfb_data = *data; | 629 | ep93xxfb_data = *data; |
@@ -546,6 +634,8 @@ void __init ep93xx_register_fb(struct ep93xxfb_mach_info *data) | |||
546 | /************************************************************************* | 634 | /************************************************************************* |
547 | * EP93xx matrix keypad peripheral handling | 635 | * EP93xx matrix keypad peripheral handling |
548 | *************************************************************************/ | 636 | *************************************************************************/ |
637 | static struct ep93xx_keypad_platform_data ep93xx_keypad_data; | ||
638 | |||
549 | static struct resource ep93xx_keypad_resource[] = { | 639 | static struct resource ep93xx_keypad_resource[] = { |
550 | { | 640 | { |
551 | .start = EP93XX_KEY_MATRIX_PHYS_BASE, | 641 | .start = EP93XX_KEY_MATRIX_PHYS_BASE, |
@@ -559,15 +649,22 @@ static struct resource ep93xx_keypad_resource[] = { | |||
559 | }; | 649 | }; |
560 | 650 | ||
561 | static struct platform_device ep93xx_keypad_device = { | 651 | static struct platform_device ep93xx_keypad_device = { |
562 | .name = "ep93xx-keypad", | 652 | .name = "ep93xx-keypad", |
563 | .id = -1, | 653 | .id = -1, |
564 | .num_resources = ARRAY_SIZE(ep93xx_keypad_resource), | 654 | .dev = { |
565 | .resource = ep93xx_keypad_resource, | 655 | .platform_data = &ep93xx_keypad_data, |
656 | }, | ||
657 | .num_resources = ARRAY_SIZE(ep93xx_keypad_resource), | ||
658 | .resource = ep93xx_keypad_resource, | ||
566 | }; | 659 | }; |
567 | 660 | ||
661 | /** | ||
662 | * ep93xx_register_keypad - Register the keypad platform device. | ||
663 | * @data: platform specific keypad configuration (__initdata) | ||
664 | */ | ||
568 | void __init ep93xx_register_keypad(struct ep93xx_keypad_platform_data *data) | 665 | void __init ep93xx_register_keypad(struct ep93xx_keypad_platform_data *data) |
569 | { | 666 | { |
570 | ep93xx_keypad_device.dev.platform_data = data; | 667 | ep93xx_keypad_data = *data; |
571 | platform_device_register(&ep93xx_keypad_device); | 668 | platform_device_register(&ep93xx_keypad_device); |
572 | } | 669 | } |
573 | 670 | ||
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c index d22d67ac8b99..3884182cd362 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c +++ b/arch/arm/mach-ep93xx/edb93xx.c | |||
@@ -74,7 +74,7 @@ static void __init edb93xx_register_flash(void) | |||
74 | } | 74 | } |
75 | } | 75 | } |
76 | 76 | ||
77 | static struct ep93xx_eth_data edb93xx_eth_data = { | 77 | static struct ep93xx_eth_data __initdata edb93xx_eth_data = { |
78 | .phy_id = 1, | 78 | .phy_id = 1, |
79 | }; | 79 | }; |
80 | 80 | ||
@@ -82,7 +82,7 @@ static struct ep93xx_eth_data edb93xx_eth_data = { | |||
82 | /************************************************************************* | 82 | /************************************************************************* |
83 | * EDB93xx i2c peripheral handling | 83 | * EDB93xx i2c peripheral handling |
84 | *************************************************************************/ | 84 | *************************************************************************/ |
85 | static struct i2c_gpio_platform_data edb93xx_i2c_gpio_data = { | 85 | static struct i2c_gpio_platform_data __initdata edb93xx_i2c_gpio_data = { |
86 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, | 86 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, |
87 | .sda_is_open_drain = 0, | 87 | .sda_is_open_drain = 0, |
88 | .scl_pin = EP93XX_GPIO_LINE_EECLK, | 88 | .scl_pin = EP93XX_GPIO_LINE_EECLK, |
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c index 3da7ca816d19..a809618e9f05 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c +++ b/arch/arm/mach-ep93xx/gesbc9312.c | |||
@@ -41,7 +41,7 @@ static struct platform_device gesbc9312_flash = { | |||
41 | .resource = &gesbc9312_flash_resource, | 41 | .resource = &gesbc9312_flash_resource, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | static struct ep93xx_eth_data gesbc9312_eth_data = { | 44 | static struct ep93xx_eth_data __initdata gesbc9312_eth_data = { |
45 | .phy_id = 1, | 45 | .phy_id = 1, |
46 | }; | 46 | }; |
47 | 47 | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h index 93e2ecc79ceb..b1e096f0c2d2 100644 --- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h +++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h | |||
@@ -106,6 +106,7 @@ | |||
106 | 106 | ||
107 | #define EP93XX_AAC_BASE EP93XX_APB_IOMEM(0x00080000) | 107 | #define EP93XX_AAC_BASE EP93XX_APB_IOMEM(0x00080000) |
108 | 108 | ||
109 | #define EP93XX_SPI_PHYS_BASE EP93XX_APB_PHYS(0x000a0000) | ||
109 | #define EP93XX_SPI_BASE EP93XX_APB_IOMEM(0x000a0000) | 110 | #define EP93XX_SPI_BASE EP93XX_APB_IOMEM(0x000a0000) |
110 | 111 | ||
111 | #define EP93XX_IRDA_BASE EP93XX_APB_IOMEM(0x000b0000) | 112 | #define EP93XX_IRDA_BASE EP93XX_APB_IOMEM(0x000b0000) |
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index c6dc14dbca18..9a4413dd44bb 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h | |||
@@ -6,9 +6,11 @@ | |||
6 | 6 | ||
7 | struct i2c_gpio_platform_data; | 7 | struct i2c_gpio_platform_data; |
8 | struct i2c_board_info; | 8 | struct i2c_board_info; |
9 | struct spi_board_info; | ||
9 | struct platform_device; | 10 | struct platform_device; |
10 | struct ep93xxfb_mach_info; | 11 | struct ep93xxfb_mach_info; |
11 | struct ep93xx_keypad_platform_data; | 12 | struct ep93xx_keypad_platform_data; |
13 | struct ep93xx_spi_info; | ||
12 | 14 | ||
13 | struct ep93xx_eth_data | 15 | struct ep93xx_eth_data |
14 | { | 16 | { |
@@ -33,9 +35,19 @@ static inline void ep93xx_devcfg_clear_bits(unsigned int bits) | |||
33 | ep93xx_devcfg_set_clear(0x00, bits); | 35 | ep93xx_devcfg_set_clear(0x00, bits); |
34 | } | 36 | } |
35 | 37 | ||
38 | #define EP93XX_CHIP_REV_D0 3 | ||
39 | #define EP93XX_CHIP_REV_D1 4 | ||
40 | #define EP93XX_CHIP_REV_E0 5 | ||
41 | #define EP93XX_CHIP_REV_E1 6 | ||
42 | #define EP93XX_CHIP_REV_E2 7 | ||
43 | |||
44 | unsigned int ep93xx_chip_revision(void); | ||
45 | |||
36 | void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); | 46 | void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); |
37 | void ep93xx_register_i2c(struct i2c_gpio_platform_data *data, | 47 | void ep93xx_register_i2c(struct i2c_gpio_platform_data *data, |
38 | struct i2c_board_info *devices, int num); | 48 | struct i2c_board_info *devices, int num); |
49 | void ep93xx_register_spi(struct ep93xx_spi_info *info, | ||
50 | struct spi_board_info *devices, int num); | ||
39 | void ep93xx_register_fb(struct ep93xxfb_mach_info *data); | 51 | void ep93xx_register_fb(struct ep93xxfb_mach_info *data); |
40 | void ep93xx_register_pwm(int pwm0, int pwm1); | 52 | void ep93xx_register_pwm(int pwm0, int pwm1); |
41 | int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); | 53 | int ep93xx_pwm_acquire_gpio(struct platform_device *pdev); |
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c index c33360e82868..1cc911b4efa6 100644 --- a/arch/arm/mach-ep93xx/micro9.c +++ b/arch/arm/mach-ep93xx/micro9.c | |||
@@ -80,7 +80,7 @@ static void __init micro9_register_flash(void) | |||
80 | /************************************************************************* | 80 | /************************************************************************* |
81 | * Micro9 Ethernet | 81 | * Micro9 Ethernet |
82 | *************************************************************************/ | 82 | *************************************************************************/ |
83 | static struct ep93xx_eth_data micro9_eth_data = { | 83 | static struct ep93xx_eth_data __initdata micro9_eth_data = { |
84 | .phy_id = 0x1f, | 84 | .phy_id = 0x1f, |
85 | }; | 85 | }; |
86 | 86 | ||
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c index cd93990f1b99..388aec95f60e 100644 --- a/arch/arm/mach-ep93xx/simone.c +++ b/arch/arm/mach-ep93xx/simone.c | |||
@@ -49,17 +49,17 @@ static struct platform_device simone_flash = { | |||
49 | }, | 49 | }, |
50 | }; | 50 | }; |
51 | 51 | ||
52 | static struct ep93xx_eth_data simone_eth_data = { | 52 | static struct ep93xx_eth_data __initdata simone_eth_data = { |
53 | .phy_id = 1, | 53 | .phy_id = 1, |
54 | }; | 54 | }; |
55 | 55 | ||
56 | static struct ep93xxfb_mach_info simone_fb_info = { | 56 | static struct ep93xxfb_mach_info __initdata simone_fb_info = { |
57 | .num_modes = EP93XXFB_USE_MODEDB, | 57 | .num_modes = EP93XXFB_USE_MODEDB, |
58 | .bpp = 16, | 58 | .bpp = 16, |
59 | .flags = EP93XXFB_USE_SDCSN0 | EP93XXFB_PCLK_FALLING, | 59 | .flags = EP93XXFB_USE_SDCSN0 | EP93XXFB_PCLK_FALLING, |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static struct i2c_gpio_platform_data simone_i2c_gpio_data = { | 62 | static struct i2c_gpio_platform_data __initdata simone_i2c_gpio_data = { |
63 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, | 63 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, |
64 | .sda_is_open_drain = 0, | 64 | .sda_is_open_drain = 0, |
65 | .scl_pin = EP93XX_GPIO_LINE_EECLK, | 65 | .scl_pin = EP93XX_GPIO_LINE_EECLK, |
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c index 51134b0382ca..38deaee40397 100644 --- a/arch/arm/mach-ep93xx/snappercl15.c +++ b/arch/arm/mach-ep93xx/snappercl15.c | |||
@@ -125,11 +125,11 @@ static struct platform_device snappercl15_nand_device = { | |||
125 | .num_resources = ARRAY_SIZE(snappercl15_nand_resource), | 125 | .num_resources = ARRAY_SIZE(snappercl15_nand_resource), |
126 | }; | 126 | }; |
127 | 127 | ||
128 | static struct ep93xx_eth_data snappercl15_eth_data = { | 128 | static struct ep93xx_eth_data __initdata snappercl15_eth_data = { |
129 | .phy_id = 1, | 129 | .phy_id = 1, |
130 | }; | 130 | }; |
131 | 131 | ||
132 | static struct i2c_gpio_platform_data snappercl15_i2c_gpio_data = { | 132 | static struct i2c_gpio_platform_data __initdata snappercl15_i2c_gpio_data = { |
133 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, | 133 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, |
134 | .sda_is_open_drain = 0, | 134 | .sda_is_open_drain = 0, |
135 | .scl_pin = EP93XX_GPIO_LINE_EECLK, | 135 | .scl_pin = EP93XX_GPIO_LINE_EECLK, |
@@ -145,7 +145,7 @@ static struct i2c_board_info __initdata snappercl15_i2c_data[] = { | |||
145 | }, | 145 | }, |
146 | }; | 146 | }; |
147 | 147 | ||
148 | static struct ep93xxfb_mach_info snappercl15_fb_info = { | 148 | static struct ep93xxfb_mach_info __initdata snappercl15_fb_info = { |
149 | .num_modes = EP93XXFB_USE_MODEDB, | 149 | .num_modes = EP93XXFB_USE_MODEDB, |
150 | .bpp = 16, | 150 | .bpp = 16, |
151 | }; | 151 | }; |
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index fac1ec7a60fb..9553031900b0 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
@@ -186,7 +186,7 @@ static struct platform_device ts72xx_wdt_device = { | |||
186 | .resource = ts72xx_wdt_resources, | 186 | .resource = ts72xx_wdt_resources, |
187 | }; | 187 | }; |
188 | 188 | ||
189 | static struct ep93xx_eth_data ts72xx_eth_data = { | 189 | static struct ep93xx_eth_data __initdata ts72xx_eth_data = { |
190 | .phy_id = 1, | 190 | .phy_id = 1, |
191 | }; | 191 | }; |
192 | 192 | ||
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index 2a5c637639bb..266b1f58a784 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c | |||
@@ -177,7 +177,7 @@ static struct plat_serial8250_port n2100_serial_port[] = { | |||
177 | .mapbase = N2100_UART, | 177 | .mapbase = N2100_UART, |
178 | .membase = (char *)N2100_UART, | 178 | .membase = (char *)N2100_UART, |
179 | .irq = 0, | 179 | .irq = 0, |
180 | .flags = UPF_SKIP_TEST, | 180 | .flags = UPF_SKIP_TEST | UPF_AUTO_IRQ | UPF_SHARE_IRQ, |
181 | .iotype = UPIO_MEM, | 181 | .iotype = UPIO_MEM, |
182 | .regshift = 0, | 182 | .regshift = 0, |
183 | .uartclk = 1843200, | 183 | .uartclk = 1843200, |
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 71728d36d501..0bce09799d18 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/tty.h> | 21 | #include <linux/tty.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/serial_core.h> | 23 | #include <linux/serial_core.h> |
24 | #include <linux/bootmem.h> | ||
25 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
26 | #include <linux/bitops.h> | 25 | #include <linux/bitops.h> |
27 | #include <linux/time.h> | 26 | #include <linux/time.h> |
diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig index 3c5e0f522e9c..71f3ea623974 100644 --- a/arch/arm/mach-nomadik/Kconfig +++ b/arch/arm/mach-nomadik/Kconfig | |||
@@ -6,6 +6,7 @@ config MACH_NOMADIK_8815NHK | |||
6 | bool "ST 8815 Nomadik Hardware Kit (evaluation board)" | 6 | bool "ST 8815 Nomadik Hardware Kit (evaluation board)" |
7 | select NOMADIK_8815 | 7 | select NOMADIK_8815 |
8 | select HAS_MTU | 8 | select HAS_MTU |
9 | select NOMADIK_GPIO | ||
9 | 10 | ||
10 | endmenu | 11 | endmenu |
11 | 12 | ||
diff --git a/arch/arm/mach-nomadik/Makefile b/arch/arm/mach-nomadik/Makefile index 36f67fb207d2..a6bbd1a7b4e7 100644 --- a/arch/arm/mach-nomadik/Makefile +++ b/arch/arm/mach-nomadik/Makefile | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | # Object file lists. | 8 | # Object file lists. |
9 | 9 | ||
10 | obj-y += clock.o gpio.o | 10 | obj-y += clock.o |
11 | 11 | ||
12 | # Cpu revision | 12 | # Cpu revision |
13 | obj-$(CONFIG_NOMADIK_8815) += cpu-8815.o | 13 | obj-$(CONFIG_NOMADIK_8815) += cpu-8815.o |
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index ab3712c86d2b..841d459ad59d 100644 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ b/arch/arm/mach-nomadik/board-nhk8815.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <mach/setup.h> | 32 | #include <mach/setup.h> |
33 | #include <mach/nand.h> | 33 | #include <mach/nand.h> |
34 | #include <mach/fsmc.h> | 34 | #include <mach/fsmc.h> |
35 | #include "clock.h" | ||
36 | 35 | ||
37 | /* Initial value for SRC control register: all timers use MXTAL/8 source */ | 36 | /* Initial value for SRC control register: all timers use MXTAL/8 source */ |
38 | #define SRC_CR_INIT_MASK 0x00007fff | 37 | #define SRC_CR_INIT_MASK 0x00007fff |
@@ -202,11 +201,6 @@ static struct amba_device *amba_devs[] __initdata = { | |||
202 | &uart1_device, | 201 | &uart1_device, |
203 | }; | 202 | }; |
204 | 203 | ||
205 | /* We have a fixed clock alone, by now */ | ||
206 | static struct clk nhk8815_clk_48 = { | ||
207 | .rate = 48*1000*1000, | ||
208 | }; | ||
209 | |||
210 | static struct resource nhk8815_eth_resources[] = { | 204 | static struct resource nhk8815_eth_resources[] = { |
211 | { | 205 | { |
212 | .name = "smc91x-regs", | 206 | .name = "smc91x-regs", |
@@ -276,10 +270,8 @@ static void __init nhk8815_platform_init(void) | |||
276 | platform_add_devices(nhk8815_platform_devices, | 270 | platform_add_devices(nhk8815_platform_devices, |
277 | ARRAY_SIZE(nhk8815_platform_devices)); | 271 | ARRAY_SIZE(nhk8815_platform_devices)); |
278 | 272 | ||
279 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 273 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) |
280 | nmdk_clk_create(&nhk8815_clk_48, amba_devs[i]->dev.init_name); | ||
281 | amba_device_register(amba_devs[i], &iomem_resource); | 274 | amba_device_register(amba_devs[i], &iomem_resource); |
282 | } | ||
283 | } | 275 | } |
284 | 276 | ||
285 | MACHINE_START(NOMADIK, "NHK8815") | 277 | MACHINE_START(NOMADIK, "NHK8815") |
diff --git a/arch/arm/mach-nomadik/clock.c b/arch/arm/mach-nomadik/clock.c index 9f92502a0083..60f5bee09f2e 100644 --- a/arch/arm/mach-nomadik/clock.c +++ b/arch/arm/mach-nomadik/clock.c | |||
@@ -32,14 +32,36 @@ void clk_disable(struct clk *clk) | |||
32 | } | 32 | } |
33 | EXPORT_SYMBOL(clk_disable); | 33 | EXPORT_SYMBOL(clk_disable); |
34 | 34 | ||
35 | /* Create a clock structure with the given name */ | 35 | /* We have a fixed clock alone, for now */ |
36 | int nmdk_clk_create(struct clk *clk, const char *dev_id) | 36 | static struct clk clk_48 = { |
37 | { | 37 | .rate = 48 * 1000 * 1000, |
38 | struct clk_lookup *clkdev; | 38 | }; |
39 | |||
40 | /* | ||
41 | * Catch-all default clock to satisfy drivers using the clk API. We don't | ||
42 | * model the actual hardware clocks yet. | ||
43 | */ | ||
44 | static struct clk clk_default; | ||
39 | 45 | ||
40 | clkdev = clkdev_alloc(clk, NULL, dev_id); | 46 | #define CLK(_clk, dev) \ |
41 | if (!clkdev) | 47 | { \ |
42 | return -ENOMEM; | 48 | .clk = _clk, \ |
43 | clkdev_add(clkdev); | 49 | .dev_id = dev, \ |
50 | } | ||
51 | |||
52 | static struct clk_lookup lookups[] = { | ||
53 | CLK(&clk_48, "uart0"), | ||
54 | CLK(&clk_48, "uart1"), | ||
55 | CLK(&clk_default, "gpio.0"), | ||
56 | CLK(&clk_default, "gpio.1"), | ||
57 | CLK(&clk_default, "gpio.2"), | ||
58 | CLK(&clk_default, "gpio.3"), | ||
59 | }; | ||
60 | |||
61 | static int __init clk_init(void) | ||
62 | { | ||
63 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
44 | return 0; | 64 | return 0; |
45 | } | 65 | } |
66 | |||
67 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-nomadik/clock.h b/arch/arm/mach-nomadik/clock.h index 235faec7f627..5563985a2cc7 100644 --- a/arch/arm/mach-nomadik/clock.h +++ b/arch/arm/mach-nomadik/clock.h | |||
@@ -11,4 +11,3 @@ | |||
11 | struct clk { | 11 | struct clk { |
12 | unsigned long rate; | 12 | unsigned long rate; |
13 | }; | 13 | }; |
14 | extern int nmdk_clk_create(struct clk *clk, const char *dev_id); | ||
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 9bf33b30a025..91c3c901b469 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/amba/bus.h> | 22 | #include <linux/amba/bus.h> |
23 | #include <linux/platform_device.h> | ||
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
24 | 25 | ||
25 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
@@ -30,60 +31,66 @@ | |||
30 | #include <asm/cacheflush.h> | 31 | #include <asm/cacheflush.h> |
31 | #include <asm/hardware/cache-l2x0.h> | 32 | #include <asm/hardware/cache-l2x0.h> |
32 | 33 | ||
34 | #define __MEM_4K_RESOURCE(x) \ | ||
35 | .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM} | ||
36 | |||
33 | /* The 8815 has 4 GPIO blocks, let's register them immediately */ | 37 | /* The 8815 has 4 GPIO blocks, let's register them immediately */ |
38 | |||
39 | #define GPIO_RESOURCE(block) \ | ||
40 | { \ | ||
41 | .start = NOMADIK_GPIO##block##_BASE, \ | ||
42 | .end = NOMADIK_GPIO##block##_BASE + SZ_4K - 1, \ | ||
43 | .flags = IORESOURCE_MEM, \ | ||
44 | }, \ | ||
45 | { \ | ||
46 | .start = IRQ_GPIO##block, \ | ||
47 | .end = IRQ_GPIO##block, \ | ||
48 | .flags = IORESOURCE_IRQ, \ | ||
49 | } | ||
50 | |||
51 | #define GPIO_DEVICE(block) \ | ||
52 | { \ | ||
53 | .name = "gpio", \ | ||
54 | .id = block, \ | ||
55 | .num_resources = 2, \ | ||
56 | .resource = &cpu8815_gpio_resources[block * 2], \ | ||
57 | .dev = { \ | ||
58 | .platform_data = &cpu8815_gpio[block], \ | ||
59 | }, \ | ||
60 | } | ||
61 | |||
34 | static struct nmk_gpio_platform_data cpu8815_gpio[] = { | 62 | static struct nmk_gpio_platform_data cpu8815_gpio[] = { |
35 | { | 63 | { |
36 | .name = "GPIO-0-31", | 64 | .name = "GPIO-0-31", |
37 | .first_gpio = 0, | 65 | .first_gpio = 0, |
38 | .first_irq = NOMADIK_GPIO_TO_IRQ(0), | 66 | .first_irq = NOMADIK_GPIO_TO_IRQ(0), |
39 | .parent_irq = IRQ_GPIO0, | ||
40 | }, { | 67 | }, { |
41 | .name = "GPIO-32-63", | 68 | .name = "GPIO-32-63", |
42 | .first_gpio = 32, | 69 | .first_gpio = 32, |
43 | .first_irq = NOMADIK_GPIO_TO_IRQ(32), | 70 | .first_irq = NOMADIK_GPIO_TO_IRQ(32), |
44 | .parent_irq = IRQ_GPIO1, | ||
45 | }, { | 71 | }, { |
46 | .name = "GPIO-64-95", | 72 | .name = "GPIO-64-95", |
47 | .first_gpio = 64, | 73 | .first_gpio = 64, |
48 | .first_irq = NOMADIK_GPIO_TO_IRQ(64), | 74 | .first_irq = NOMADIK_GPIO_TO_IRQ(64), |
49 | .parent_irq = IRQ_GPIO2, | ||
50 | }, { | 75 | }, { |
51 | .name = "GPIO-96-127", /* 124..127 not routed to pin */ | 76 | .name = "GPIO-96-127", /* 124..127 not routed to pin */ |
52 | .first_gpio = 96, | 77 | .first_gpio = 96, |
53 | .first_irq = NOMADIK_GPIO_TO_IRQ(96), | 78 | .first_irq = NOMADIK_GPIO_TO_IRQ(96), |
54 | .parent_irq = IRQ_GPIO3, | ||
55 | } | 79 | } |
56 | }; | 80 | }; |
57 | 81 | ||
58 | #define __MEM_4K_RESOURCE(x) \ | 82 | static struct resource cpu8815_gpio_resources[] = { |
59 | .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM} | 83 | GPIO_RESOURCE(0), |
84 | GPIO_RESOURCE(1), | ||
85 | GPIO_RESOURCE(2), | ||
86 | GPIO_RESOURCE(3), | ||
87 | }; | ||
60 | 88 | ||
61 | static struct amba_device cpu8815_amba_gpio[] = { | 89 | static struct platform_device cpu8815_platform_gpio[] = { |
62 | { | 90 | GPIO_DEVICE(0), |
63 | .dev = { | 91 | GPIO_DEVICE(1), |
64 | .init_name = "gpio0", | 92 | GPIO_DEVICE(2), |
65 | .platform_data = cpu8815_gpio + 0, | 93 | GPIO_DEVICE(3), |
66 | }, | ||
67 | __MEM_4K_RESOURCE(NOMADIK_GPIO0_BASE), | ||
68 | }, { | ||
69 | .dev = { | ||
70 | .init_name = "gpio1", | ||
71 | .platform_data = cpu8815_gpio + 1, | ||
72 | }, | ||
73 | __MEM_4K_RESOURCE(NOMADIK_GPIO1_BASE), | ||
74 | }, { | ||
75 | .dev = { | ||
76 | .init_name = "gpio2", | ||
77 | .platform_data = cpu8815_gpio + 2, | ||
78 | }, | ||
79 | __MEM_4K_RESOURCE(NOMADIK_GPIO2_BASE), | ||
80 | }, { | ||
81 | .dev = { | ||
82 | .init_name = "gpio3", | ||
83 | .platform_data = cpu8815_gpio + 3, | ||
84 | }, | ||
85 | __MEM_4K_RESOURCE(NOMADIK_GPIO3_BASE), | ||
86 | }, | ||
87 | }; | 94 | }; |
88 | 95 | ||
89 | static struct amba_device cpu8815_amba_rng = { | 96 | static struct amba_device cpu8815_amba_rng = { |
@@ -93,11 +100,14 @@ static struct amba_device cpu8815_amba_rng = { | |||
93 | __MEM_4K_RESOURCE(NOMADIK_RNG_BASE), | 100 | __MEM_4K_RESOURCE(NOMADIK_RNG_BASE), |
94 | }; | 101 | }; |
95 | 102 | ||
103 | static struct platform_device *platform_devs[] __initdata = { | ||
104 | cpu8815_platform_gpio + 0, | ||
105 | cpu8815_platform_gpio + 1, | ||
106 | cpu8815_platform_gpio + 2, | ||
107 | cpu8815_platform_gpio + 3, | ||
108 | }; | ||
109 | |||
96 | static struct amba_device *amba_devs[] __initdata = { | 110 | static struct amba_device *amba_devs[] __initdata = { |
97 | cpu8815_amba_gpio + 0, | ||
98 | cpu8815_amba_gpio + 1, | ||
99 | cpu8815_amba_gpio + 2, | ||
100 | cpu8815_amba_gpio + 3, | ||
101 | &cpu8815_amba_rng | 111 | &cpu8815_amba_rng |
102 | }; | 112 | }; |
103 | 113 | ||
@@ -105,6 +115,7 @@ static int __init cpu8815_init(void) | |||
105 | { | 115 | { |
106 | int i; | 116 | int i; |
107 | 117 | ||
118 | platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); | ||
108 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) | 119 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) |
109 | amba_device_register(amba_devs[i], &iomem_resource); | 120 | amba_device_register(amba_devs[i], &iomem_resource); |
110 | return 0; | 121 | return 0; |
diff --git a/arch/arm/mach-nomadik/include/mach/gpio.h b/arch/arm/mach-nomadik/include/mach/gpio.h index 61577c9f9a7d..7a81a0420343 100644 --- a/arch/arm/mach-nomadik/include/mach/gpio.h +++ b/arch/arm/mach-nomadik/include/mach/gpio.h | |||
@@ -1,71 +1,6 @@ | |||
1 | /* | ||
2 | * Structures and registers for GPIO access in the Nomadik SoC | ||
3 | * | ||
4 | * Copyright (C) 2008 STMicroelectronics | ||
5 | * Author: Prafulla WADASKAR <prafulla.wadaskar@st.com> | ||
6 | * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #ifndef __ASM_ARCH_GPIO_H | 1 | #ifndef __ASM_ARCH_GPIO_H |
13 | #define __ASM_ARCH_GPIO_H | 2 | #define __ASM_ARCH_GPIO_H |
14 | 3 | ||
15 | #include <asm-generic/gpio.h> | 4 | #include <plat/gpio.h> |
16 | |||
17 | /* | ||
18 | * These currently cause a function call to happen, they may be optimized | ||
19 | * if needed by adding cpu-specific defines to identify blocks | ||
20 | * (see mach-pxa/include/mach/gpio.h as an example using GPLR etc) | ||
21 | */ | ||
22 | #define gpio_get_value __gpio_get_value | ||
23 | #define gpio_set_value __gpio_set_value | ||
24 | #define gpio_cansleep __gpio_cansleep | ||
25 | #define gpio_to_irq __gpio_to_irq | ||
26 | |||
27 | /* | ||
28 | * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving | ||
29 | * the "gpio" namespace for generic and cross-machine functions | ||
30 | */ | ||
31 | |||
32 | /* Register in the logic block */ | ||
33 | #define NMK_GPIO_DAT 0x00 | ||
34 | #define NMK_GPIO_DATS 0x04 | ||
35 | #define NMK_GPIO_DATC 0x08 | ||
36 | #define NMK_GPIO_PDIS 0x0c | ||
37 | #define NMK_GPIO_DIR 0x10 | ||
38 | #define NMK_GPIO_DIRS 0x14 | ||
39 | #define NMK_GPIO_DIRC 0x18 | ||
40 | #define NMK_GPIO_SLPC 0x1c | ||
41 | #define NMK_GPIO_AFSLA 0x20 | ||
42 | #define NMK_GPIO_AFSLB 0x24 | ||
43 | |||
44 | #define NMK_GPIO_RIMSC 0x40 | ||
45 | #define NMK_GPIO_FIMSC 0x44 | ||
46 | #define NMK_GPIO_IS 0x48 | ||
47 | #define NMK_GPIO_IC 0x4c | ||
48 | #define NMK_GPIO_RWIMSC 0x50 | ||
49 | #define NMK_GPIO_FWIMSC 0x54 | ||
50 | #define NMK_GPIO_WKS 0x58 | ||
51 | |||
52 | /* Alternate functions: function C is set in hw by setting both A and B */ | ||
53 | #define NMK_GPIO_ALT_GPIO 0 | ||
54 | #define NMK_GPIO_ALT_A 1 | ||
55 | #define NMK_GPIO_ALT_B 2 | ||
56 | #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) | ||
57 | |||
58 | extern int nmk_gpio_set_mode(int gpio, int gpio_mode); | ||
59 | extern int nmk_gpio_get_mode(int gpio); | ||
60 | |||
61 | /* | ||
62 | * Platform data to register a block: only the initial gpio/irq number. | ||
63 | */ | ||
64 | struct nmk_gpio_platform_data { | ||
65 | char *name; | ||
66 | int first_gpio; | ||
67 | int first_irq; | ||
68 | int parent_irq; | ||
69 | }; | ||
70 | 5 | ||
71 | #endif /* __ASM_ARCH_GPIO_H */ | 6 | #endif /* __ASM_ARCH_GPIO_H */ |
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index e36639f66150..8e313b4b99a9 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
30 | #include <linux/input.h> | 30 | #include <linux/input.h> |
31 | #include <linux/bootmem.h> | ||
32 | #include <linux/io.h> | 31 | #include <linux/io.h> |
33 | #include <linux/gpio.h> | 32 | #include <linux/gpio.h> |
34 | 33 | ||
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 23e4d7733610..4a1c2328bcc3 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -17,8 +17,10 @@ | |||
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | 18 | ||
19 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
20 | #include <mach/irqs.h> | ||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
23 | #include <asm/pmu.h> | ||
22 | 24 | ||
23 | #include <plat/control.h> | 25 | #include <plat/control.h> |
24 | #include <plat/tc.h> | 26 | #include <plat/tc.h> |
@@ -453,6 +455,37 @@ static void omap_init_mcspi(void) | |||
453 | static inline void omap_init_mcspi(void) {} | 455 | static inline void omap_init_mcspi(void) {} |
454 | #endif | 456 | #endif |
455 | 457 | ||
458 | static struct resource omap2_pmu_resource = { | ||
459 | .start = 3, | ||
460 | .end = 3, | ||
461 | .flags = IORESOURCE_IRQ, | ||
462 | }; | ||
463 | |||
464 | static struct resource omap3_pmu_resource = { | ||
465 | .start = INT_34XX_BENCH_MPU_EMUL, | ||
466 | .end = INT_34XX_BENCH_MPU_EMUL, | ||
467 | .flags = IORESOURCE_IRQ, | ||
468 | }; | ||
469 | |||
470 | static struct platform_device omap_pmu_device = { | ||
471 | .name = "arm-pmu", | ||
472 | .id = ARM_PMU_DEVICE_CPU, | ||
473 | .num_resources = 1, | ||
474 | }; | ||
475 | |||
476 | static void omap_init_pmu(void) | ||
477 | { | ||
478 | if (cpu_is_omap24xx()) | ||
479 | omap_pmu_device.resource = &omap2_pmu_resource; | ||
480 | else if (cpu_is_omap34xx()) | ||
481 | omap_pmu_device.resource = &omap3_pmu_resource; | ||
482 | else | ||
483 | return; | ||
484 | |||
485 | platform_device_register(&omap_pmu_device); | ||
486 | } | ||
487 | |||
488 | |||
456 | #ifdef CONFIG_OMAP_SHA1_MD5 | 489 | #ifdef CONFIG_OMAP_SHA1_MD5 |
457 | static struct resource sha1_md5_resources[] = { | 490 | static struct resource sha1_md5_resources[] = { |
458 | { | 491 | { |
@@ -797,6 +830,7 @@ static int __init omap2_init_devices(void) | |||
797 | omap_init_camera(); | 830 | omap_init_camera(); |
798 | omap_init_mbox(); | 831 | omap_init_mbox(); |
799 | omap_init_mcspi(); | 832 | omap_init_mcspi(); |
833 | omap_init_pmu(); | ||
800 | omap_hdq_init(); | 834 | omap_hdq_init(); |
801 | omap_init_sti(); | 835 | omap_init_sti(); |
802 | omap_init_sha1_md5(); | 836 | omap_init_sha1_md5(); |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index c6649472ce0d..aa3e20915d72 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include <linux/err.h> | 43 | #include <linux/err.h> |
44 | #include <linux/list.h> | 44 | #include <linux/list.h> |
45 | #include <linux/mutex.h> | 45 | #include <linux/mutex.h> |
46 | #include <linux/bootmem.h> | ||
47 | 46 | ||
48 | #include <plat/common.h> | 47 | #include <plat/common.h> |
49 | #include <plat/cpu.h> | 48 | #include <plat/cpu.h> |
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c index be048e3e8799..f95521a5e5ce 100644 --- a/arch/arm/mach-realview/hotplug.c +++ b/arch/arm/mach-realview/hotplug.c | |||
@@ -131,7 +131,7 @@ void platform_cpu_die(unsigned int cpu) | |||
131 | cpu_leave_lowpower(); | 131 | cpu_leave_lowpower(); |
132 | } | 132 | } |
133 | 133 | ||
134 | int mach_cpu_disable(unsigned int cpu) | 134 | int platform_cpu_disable(unsigned int cpu) |
135 | { | 135 | { |
136 | /* | 136 | /* |
137 | * we don't allow CPU 0 to be shutdown (it is still too special | 137 | * we don't allow CPU 0 to be shutdown (it is still too special |
diff --git a/arch/arm/mach-spear3xx/Kconfig b/arch/arm/mach-spear3xx/Kconfig new file mode 100644 index 000000000000..20d1317cc486 --- /dev/null +++ b/arch/arm/mach-spear3xx/Kconfig | |||
@@ -0,0 +1,33 @@ | |||
1 | # | ||
2 | # SPEAr3XX Machine configuration file | ||
3 | # | ||
4 | |||
5 | if ARCH_SPEAR3XX | ||
6 | |||
7 | choice | ||
8 | prompt "SPEAr3XX Family" | ||
9 | default MACH_SPEAR300 | ||
10 | |||
11 | config MACH_SPEAR300 | ||
12 | bool "SPEAr300" | ||
13 | help | ||
14 | Supports ST SPEAr300 Machine | ||
15 | |||
16 | config MACH_SPEAR310 | ||
17 | bool "SPEAr310" | ||
18 | help | ||
19 | Supports ST SPEAr310 Machine | ||
20 | |||
21 | config MACH_SPEAR320 | ||
22 | bool "SPEAr320" | ||
23 | help | ||
24 | Supports ST SPEAr320 Machine | ||
25 | |||
26 | endchoice | ||
27 | |||
28 | # Adding SPEAr3XX machine specific configuration files | ||
29 | source "arch/arm/mach-spear3xx/Kconfig300" | ||
30 | source "arch/arm/mach-spear3xx/Kconfig310" | ||
31 | source "arch/arm/mach-spear3xx/Kconfig320" | ||
32 | |||
33 | endif #ARCH_SPEAR3XX | ||
diff --git a/arch/arm/mach-spear3xx/Kconfig300 b/arch/arm/mach-spear3xx/Kconfig300 new file mode 100644 index 000000000000..c519a05b4ab4 --- /dev/null +++ b/arch/arm/mach-spear3xx/Kconfig300 | |||
@@ -0,0 +1,17 @@ | |||
1 | # | ||
2 | # SPEAr300 machine configuration file | ||
3 | # | ||
4 | |||
5 | if MACH_SPEAR300 | ||
6 | |||
7 | choice | ||
8 | prompt "SPEAr300 Boards" | ||
9 | default BOARD_SPEAR300_EVB | ||
10 | |||
11 | config BOARD_SPEAR300_EVB | ||
12 | bool "SPEAr300 Evaluation Board" | ||
13 | help | ||
14 | Supports ST SPEAr300 Evaluation Board | ||
15 | endchoice | ||
16 | |||
17 | endif #MACH_SPEAR300 | ||
diff --git a/arch/arm/mach-spear3xx/Kconfig310 b/arch/arm/mach-spear3xx/Kconfig310 new file mode 100644 index 000000000000..60e7442d75bd --- /dev/null +++ b/arch/arm/mach-spear3xx/Kconfig310 | |||
@@ -0,0 +1,17 @@ | |||
1 | # | ||
2 | # SPEAr310 machine configuration file | ||
3 | # | ||
4 | |||
5 | if MACH_SPEAR310 | ||
6 | |||
7 | choice | ||
8 | prompt "SPEAr310 Boards" | ||
9 | default BOARD_SPEAR310_EVB | ||
10 | |||
11 | config BOARD_SPEAR310_EVB | ||
12 | bool "SPEAr310 Evaluation Board" | ||
13 | help | ||
14 | Supports ST SPEAr310 Evaluation Board | ||
15 | endchoice | ||
16 | |||
17 | endif #MACH_SPEAR310 | ||
diff --git a/arch/arm/mach-spear3xx/Kconfig320 b/arch/arm/mach-spear3xx/Kconfig320 new file mode 100644 index 000000000000..1c1d438399b8 --- /dev/null +++ b/arch/arm/mach-spear3xx/Kconfig320 | |||
@@ -0,0 +1,17 @@ | |||
1 | # | ||
2 | # SPEAr320 machine configuration file | ||
3 | # | ||
4 | |||
5 | if MACH_SPEAR320 | ||
6 | |||
7 | choice | ||
8 | prompt "SPEAr320 Boards" | ||
9 | default BOARD_SPEAR320_EVB | ||
10 | |||
11 | config BOARD_SPEAR320_EVB | ||
12 | bool "SPEAr320 Evaluation Board" | ||
13 | help | ||
14 | Supports ST SPEAr320 Evaluation Board | ||
15 | endchoice | ||
16 | |||
17 | endif #MACH_SPEAR320 | ||
diff --git a/arch/arm/mach-spear3xx/Makefile b/arch/arm/mach-spear3xx/Makefile new file mode 100644 index 000000000000..b24862489704 --- /dev/null +++ b/arch/arm/mach-spear3xx/Makefile | |||
@@ -0,0 +1,26 @@ | |||
1 | # | ||
2 | # Makefile for SPEAr3XX machine series | ||
3 | # | ||
4 | |||
5 | # common files | ||
6 | obj-y += spear3xx.o clock.o | ||
7 | |||
8 | # spear300 specific files | ||
9 | obj-$(CONFIG_MACH_SPEAR300) += spear300.o | ||
10 | |||
11 | # spear300 boards files | ||
12 | obj-$(CONFIG_BOARD_SPEAR300_EVB) += spear300_evb.o | ||
13 | |||
14 | |||
15 | # spear310 specific files | ||
16 | obj-$(CONFIG_MACH_SPEAR310) += spear310.o | ||
17 | |||
18 | # spear310 boards files | ||
19 | obj-$(CONFIG_BOARD_SPEAR310_EVB) += spear310_evb.o | ||
20 | |||
21 | |||
22 | # spear320 specific files | ||
23 | obj-$(CONFIG_MACH_SPEAR320) += spear320.o | ||
24 | |||
25 | # spear320 boards files | ||
26 | obj-$(CONFIG_BOARD_SPEAR320_EVB) += spear320_evb.o | ||
diff --git a/arch/arm/mach-spear3xx/Makefile.boot b/arch/arm/mach-spear3xx/Makefile.boot new file mode 100644 index 000000000000..7a1f3c0eadb8 --- /dev/null +++ b/arch/arm/mach-spear3xx/Makefile.boot | |||
@@ -0,0 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | ||
2 | params_phys-y := 0x00000100 | ||
3 | initrd_phys-y := 0x00800000 | ||
diff --git a/arch/arm/mach-spear3xx/clock.c b/arch/arm/mach-spear3xx/clock.c new file mode 100644 index 000000000000..39f6ccf22294 --- /dev/null +++ b/arch/arm/mach-spear3xx/clock.c | |||
@@ -0,0 +1,389 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/clock.c | ||
3 | * | ||
4 | * SPEAr3xx machines clock framework source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <mach/misc_regs.h> | ||
17 | #include <plat/clock.h> | ||
18 | |||
19 | /* root clks */ | ||
20 | /* 32 KHz oscillator clock */ | ||
21 | static struct clk osc_32k_clk = { | ||
22 | .flags = ALWAYS_ENABLED, | ||
23 | .rate = 32000, | ||
24 | }; | ||
25 | |||
26 | /* 24 MHz oscillator clock */ | ||
27 | static struct clk osc_24m_clk = { | ||
28 | .flags = ALWAYS_ENABLED, | ||
29 | .rate = 24000000, | ||
30 | }; | ||
31 | |||
32 | /* clock derived from 32 KHz osc clk */ | ||
33 | /* rtc clock */ | ||
34 | static struct clk rtc_clk = { | ||
35 | .pclk = &osc_32k_clk, | ||
36 | .en_reg = PERIP1_CLK_ENB, | ||
37 | .en_reg_bit = RTC_CLK_ENB, | ||
38 | .recalc = &follow_parent, | ||
39 | }; | ||
40 | |||
41 | /* clock derived from 24 MHz osc clk */ | ||
42 | /* pll1 configuration structure */ | ||
43 | static struct pll_clk_config pll1_config = { | ||
44 | .mode_reg = PLL1_CTR, | ||
45 | .cfg_reg = PLL1_FRQ, | ||
46 | }; | ||
47 | |||
48 | /* PLL1 clock */ | ||
49 | static struct clk pll1_clk = { | ||
50 | .pclk = &osc_24m_clk, | ||
51 | .en_reg = PLL1_CTR, | ||
52 | .en_reg_bit = PLL_ENABLE, | ||
53 | .recalc = &pll1_clk_recalc, | ||
54 | .private_data = &pll1_config, | ||
55 | }; | ||
56 | |||
57 | /* PLL3 48 MHz clock */ | ||
58 | static struct clk pll3_48m_clk = { | ||
59 | .flags = ALWAYS_ENABLED, | ||
60 | .pclk = &osc_24m_clk, | ||
61 | .rate = 48000000, | ||
62 | }; | ||
63 | |||
64 | /* watch dog timer clock */ | ||
65 | static struct clk wdt_clk = { | ||
66 | .flags = ALWAYS_ENABLED, | ||
67 | .pclk = &osc_24m_clk, | ||
68 | .recalc = &follow_parent, | ||
69 | }; | ||
70 | |||
71 | /* clock derived from pll1 clk */ | ||
72 | /* cpu clock */ | ||
73 | static struct clk cpu_clk = { | ||
74 | .flags = ALWAYS_ENABLED, | ||
75 | .pclk = &pll1_clk, | ||
76 | .recalc = &follow_parent, | ||
77 | }; | ||
78 | |||
79 | /* ahb configuration structure */ | ||
80 | static struct bus_clk_config ahb_config = { | ||
81 | .reg = CORE_CLK_CFG, | ||
82 | .mask = PLL_HCLK_RATIO_MASK, | ||
83 | .shift = PLL_HCLK_RATIO_SHIFT, | ||
84 | }; | ||
85 | |||
86 | /* ahb clock */ | ||
87 | static struct clk ahb_clk = { | ||
88 | .flags = ALWAYS_ENABLED, | ||
89 | .pclk = &pll1_clk, | ||
90 | .recalc = &bus_clk_recalc, | ||
91 | .private_data = &ahb_config, | ||
92 | }; | ||
93 | |||
94 | /* uart configurations */ | ||
95 | static struct aux_clk_config uart_config = { | ||
96 | .synth_reg = UART_CLK_SYNT, | ||
97 | }; | ||
98 | |||
99 | /* uart parents */ | ||
100 | static struct pclk_info uart_pclk_info[] = { | ||
101 | { | ||
102 | .pclk = &pll1_clk, | ||
103 | .pclk_mask = AUX_CLK_PLL1_MASK, | ||
104 | .scalable = 1, | ||
105 | }, { | ||
106 | .pclk = &pll3_48m_clk, | ||
107 | .pclk_mask = AUX_CLK_PLL3_MASK, | ||
108 | .scalable = 0, | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | /* uart parent select structure */ | ||
113 | static struct pclk_sel uart_pclk_sel = { | ||
114 | .pclk_info = uart_pclk_info, | ||
115 | .pclk_count = ARRAY_SIZE(uart_pclk_info), | ||
116 | .pclk_sel_reg = PERIP_CLK_CFG, | ||
117 | .pclk_sel_mask = UART_CLK_MASK, | ||
118 | }; | ||
119 | |||
120 | /* uart clock */ | ||
121 | static struct clk uart_clk = { | ||
122 | .en_reg = PERIP1_CLK_ENB, | ||
123 | .en_reg_bit = UART_CLK_ENB, | ||
124 | .pclk_sel = &uart_pclk_sel, | ||
125 | .pclk_sel_shift = UART_CLK_SHIFT, | ||
126 | .recalc = &aux_clk_recalc, | ||
127 | .private_data = &uart_config, | ||
128 | }; | ||
129 | |||
130 | /* firda configurations */ | ||
131 | static struct aux_clk_config firda_config = { | ||
132 | .synth_reg = FIRDA_CLK_SYNT, | ||
133 | }; | ||
134 | |||
135 | /* firda parents */ | ||
136 | static struct pclk_info firda_pclk_info[] = { | ||
137 | { | ||
138 | .pclk = &pll1_clk, | ||
139 | .pclk_mask = AUX_CLK_PLL1_MASK, | ||
140 | .scalable = 1, | ||
141 | }, { | ||
142 | .pclk = &pll3_48m_clk, | ||
143 | .pclk_mask = AUX_CLK_PLL3_MASK, | ||
144 | .scalable = 0, | ||
145 | }, | ||
146 | }; | ||
147 | |||
148 | /* firda parent select structure */ | ||
149 | static struct pclk_sel firda_pclk_sel = { | ||
150 | .pclk_info = firda_pclk_info, | ||
151 | .pclk_count = ARRAY_SIZE(firda_pclk_info), | ||
152 | .pclk_sel_reg = PERIP_CLK_CFG, | ||
153 | .pclk_sel_mask = FIRDA_CLK_MASK, | ||
154 | }; | ||
155 | |||
156 | /* firda clock */ | ||
157 | static struct clk firda_clk = { | ||
158 | .en_reg = PERIP1_CLK_ENB, | ||
159 | .en_reg_bit = FIRDA_CLK_ENB, | ||
160 | .pclk_sel = &firda_pclk_sel, | ||
161 | .pclk_sel_shift = FIRDA_CLK_SHIFT, | ||
162 | .recalc = &aux_clk_recalc, | ||
163 | .private_data = &firda_config, | ||
164 | }; | ||
165 | |||
166 | /* gpt parents */ | ||
167 | static struct pclk_info gpt_pclk_info[] = { | ||
168 | { | ||
169 | .pclk = &pll1_clk, | ||
170 | .pclk_mask = AUX_CLK_PLL1_MASK, | ||
171 | .scalable = 1, | ||
172 | }, { | ||
173 | .pclk = &pll3_48m_clk, | ||
174 | .pclk_mask = AUX_CLK_PLL3_MASK, | ||
175 | .scalable = 0, | ||
176 | }, | ||
177 | }; | ||
178 | |||
179 | /* gpt parent select structure */ | ||
180 | static struct pclk_sel gpt_pclk_sel = { | ||
181 | .pclk_info = gpt_pclk_info, | ||
182 | .pclk_count = ARRAY_SIZE(gpt_pclk_info), | ||
183 | .pclk_sel_reg = PERIP_CLK_CFG, | ||
184 | .pclk_sel_mask = GPT_CLK_MASK, | ||
185 | }; | ||
186 | |||
187 | /* gpt0 configurations */ | ||
188 | static struct aux_clk_config gpt0_config = { | ||
189 | .synth_reg = PRSC1_CLK_CFG, | ||
190 | }; | ||
191 | |||
192 | /* gpt0 timer clock */ | ||
193 | static struct clk gpt0_clk = { | ||
194 | .flags = ALWAYS_ENABLED, | ||
195 | .pclk_sel = &gpt_pclk_sel, | ||
196 | .pclk_sel_shift = GPT0_CLK_SHIFT, | ||
197 | .recalc = &gpt_clk_recalc, | ||
198 | .private_data = &gpt0_config, | ||
199 | }; | ||
200 | |||
201 | /* gpt1 configurations */ | ||
202 | static struct aux_clk_config gpt1_config = { | ||
203 | .synth_reg = PRSC2_CLK_CFG, | ||
204 | }; | ||
205 | |||
206 | /* gpt1 timer clock */ | ||
207 | static struct clk gpt1_clk = { | ||
208 | .en_reg = PERIP1_CLK_ENB, | ||
209 | .en_reg_bit = GPT1_CLK_ENB, | ||
210 | .pclk_sel = &gpt_pclk_sel, | ||
211 | .pclk_sel_shift = GPT1_CLK_SHIFT, | ||
212 | .recalc = &gpt_clk_recalc, | ||
213 | .private_data = &gpt1_config, | ||
214 | }; | ||
215 | |||
216 | /* gpt2 configurations */ | ||
217 | static struct aux_clk_config gpt2_config = { | ||
218 | .synth_reg = PRSC3_CLK_CFG, | ||
219 | }; | ||
220 | |||
221 | /* gpt2 timer clock */ | ||
222 | static struct clk gpt2_clk = { | ||
223 | .en_reg = PERIP1_CLK_ENB, | ||
224 | .en_reg_bit = GPT2_CLK_ENB, | ||
225 | .pclk_sel = &gpt_pclk_sel, | ||
226 | .pclk_sel_shift = GPT2_CLK_SHIFT, | ||
227 | .recalc = &gpt_clk_recalc, | ||
228 | .private_data = &gpt2_config, | ||
229 | }; | ||
230 | |||
231 | /* clock derived from pll3 clk */ | ||
232 | /* usbh clock */ | ||
233 | static struct clk usbh_clk = { | ||
234 | .pclk = &pll3_48m_clk, | ||
235 | .en_reg = PERIP1_CLK_ENB, | ||
236 | .en_reg_bit = USBH_CLK_ENB, | ||
237 | .recalc = &follow_parent, | ||
238 | }; | ||
239 | |||
240 | /* usbd clock */ | ||
241 | static struct clk usbd_clk = { | ||
242 | .pclk = &pll3_48m_clk, | ||
243 | .en_reg = PERIP1_CLK_ENB, | ||
244 | .en_reg_bit = USBD_CLK_ENB, | ||
245 | .recalc = &follow_parent, | ||
246 | }; | ||
247 | |||
248 | /* clcd clock */ | ||
249 | static struct clk clcd_clk = { | ||
250 | .flags = ALWAYS_ENABLED, | ||
251 | .pclk = &pll3_48m_clk, | ||
252 | .recalc = &follow_parent, | ||
253 | }; | ||
254 | |||
255 | /* clock derived from ahb clk */ | ||
256 | /* apb configuration structure */ | ||
257 | static struct bus_clk_config apb_config = { | ||
258 | .reg = CORE_CLK_CFG, | ||
259 | .mask = HCLK_PCLK_RATIO_MASK, | ||
260 | .shift = HCLK_PCLK_RATIO_SHIFT, | ||
261 | }; | ||
262 | |||
263 | /* apb clock */ | ||
264 | static struct clk apb_clk = { | ||
265 | .flags = ALWAYS_ENABLED, | ||
266 | .pclk = &ahb_clk, | ||
267 | .recalc = &bus_clk_recalc, | ||
268 | .private_data = &apb_config, | ||
269 | }; | ||
270 | |||
271 | /* i2c clock */ | ||
272 | static struct clk i2c_clk = { | ||
273 | .pclk = &ahb_clk, | ||
274 | .en_reg = PERIP1_CLK_ENB, | ||
275 | .en_reg_bit = I2C_CLK_ENB, | ||
276 | .recalc = &follow_parent, | ||
277 | }; | ||
278 | |||
279 | /* dma clock */ | ||
280 | static struct clk dma_clk = { | ||
281 | .pclk = &ahb_clk, | ||
282 | .en_reg = PERIP1_CLK_ENB, | ||
283 | .en_reg_bit = DMA_CLK_ENB, | ||
284 | .recalc = &follow_parent, | ||
285 | }; | ||
286 | |||
287 | /* jpeg clock */ | ||
288 | static struct clk jpeg_clk = { | ||
289 | .pclk = &ahb_clk, | ||
290 | .en_reg = PERIP1_CLK_ENB, | ||
291 | .en_reg_bit = JPEG_CLK_ENB, | ||
292 | .recalc = &follow_parent, | ||
293 | }; | ||
294 | |||
295 | /* gmac clock */ | ||
296 | static struct clk gmac_clk = { | ||
297 | .pclk = &ahb_clk, | ||
298 | .en_reg = PERIP1_CLK_ENB, | ||
299 | .en_reg_bit = GMAC_CLK_ENB, | ||
300 | .recalc = &follow_parent, | ||
301 | }; | ||
302 | |||
303 | /* smi clock */ | ||
304 | static struct clk smi_clk = { | ||
305 | .pclk = &ahb_clk, | ||
306 | .en_reg = PERIP1_CLK_ENB, | ||
307 | .en_reg_bit = SMI_CLK_ENB, | ||
308 | .recalc = &follow_parent, | ||
309 | }; | ||
310 | |||
311 | /* c3 clock */ | ||
312 | static struct clk c3_clk = { | ||
313 | .pclk = &ahb_clk, | ||
314 | .en_reg = PERIP1_CLK_ENB, | ||
315 | .en_reg_bit = C3_CLK_ENB, | ||
316 | .recalc = &follow_parent, | ||
317 | }; | ||
318 | |||
319 | /* clock derived from apb clk */ | ||
320 | /* adc clock */ | ||
321 | static struct clk adc_clk = { | ||
322 | .pclk = &apb_clk, | ||
323 | .en_reg = PERIP1_CLK_ENB, | ||
324 | .en_reg_bit = ADC_CLK_ENB, | ||
325 | .recalc = &follow_parent, | ||
326 | }; | ||
327 | |||
328 | /* ssp clock */ | ||
329 | static struct clk ssp_clk = { | ||
330 | .pclk = &apb_clk, | ||
331 | .en_reg = PERIP1_CLK_ENB, | ||
332 | .en_reg_bit = SSP_CLK_ENB, | ||
333 | .recalc = &follow_parent, | ||
334 | }; | ||
335 | |||
336 | /* gpio clock */ | ||
337 | static struct clk gpio_clk = { | ||
338 | .pclk = &apb_clk, | ||
339 | .en_reg = PERIP1_CLK_ENB, | ||
340 | .en_reg_bit = GPIO_CLK_ENB, | ||
341 | .recalc = &follow_parent, | ||
342 | }; | ||
343 | |||
344 | /* array of all spear 3xx clock lookups */ | ||
345 | static struct clk_lookup spear_clk_lookups[] = { | ||
346 | /* root clks */ | ||
347 | { .con_id = "osc_32k_clk", .clk = &osc_32k_clk}, | ||
348 | { .con_id = "osc_24m_clk", .clk = &osc_24m_clk}, | ||
349 | /* clock derived from 32 KHz osc clk */ | ||
350 | { .dev_id = "rtc", .clk = &rtc_clk}, | ||
351 | /* clock derived from 24 MHz osc clk */ | ||
352 | { .con_id = "pll1_clk", .clk = &pll1_clk}, | ||
353 | { .con_id = "pll3_48m_clk", .clk = &pll3_48m_clk}, | ||
354 | { .dev_id = "wdt", .clk = &wdt_clk}, | ||
355 | /* clock derived from pll1 clk */ | ||
356 | { .con_id = "cpu_clk", .clk = &cpu_clk}, | ||
357 | { .con_id = "ahb_clk", .clk = &ahb_clk}, | ||
358 | { .dev_id = "uart", .clk = &uart_clk}, | ||
359 | { .dev_id = "firda", .clk = &firda_clk}, | ||
360 | { .dev_id = "gpt0", .clk = &gpt0_clk}, | ||
361 | { .dev_id = "gpt1", .clk = &gpt1_clk}, | ||
362 | { .dev_id = "gpt2", .clk = &gpt2_clk}, | ||
363 | /* clock derived from pll3 clk */ | ||
364 | { .dev_id = "usbh", .clk = &usbh_clk}, | ||
365 | { .dev_id = "usbd", .clk = &usbd_clk}, | ||
366 | { .dev_id = "clcd", .clk = &clcd_clk}, | ||
367 | /* clock derived from ahb clk */ | ||
368 | { .con_id = "apb_clk", .clk = &apb_clk}, | ||
369 | { .dev_id = "i2c", .clk = &i2c_clk}, | ||
370 | { .dev_id = "dma", .clk = &dma_clk}, | ||
371 | { .dev_id = "jpeg", .clk = &jpeg_clk}, | ||
372 | { .dev_id = "gmac", .clk = &gmac_clk}, | ||
373 | { .dev_id = "smi", .clk = &smi_clk}, | ||
374 | { .dev_id = "c3", .clk = &c3_clk}, | ||
375 | /* clock derived from apb clk */ | ||
376 | { .dev_id = "adc", .clk = &adc_clk}, | ||
377 | { .dev_id = "ssp", .clk = &ssp_clk}, | ||
378 | { .dev_id = "gpio", .clk = &gpio_clk}, | ||
379 | }; | ||
380 | |||
381 | void __init clk_init(void) | ||
382 | { | ||
383 | int i; | ||
384 | |||
385 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) | ||
386 | clk_register(&spear_clk_lookups[i]); | ||
387 | |||
388 | recalc_root_clocks(); | ||
389 | } | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/clkdev.h b/arch/arm/mach-spear3xx/include/mach/clkdev.h new file mode 100644 index 000000000000..a3d07339d9f1 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/clkdev.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/clkdev.h | ||
3 | * | ||
4 | * Clock Dev framework definitions for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_CLKDEV_H | ||
15 | #define __MACH_CLKDEV_H | ||
16 | |||
17 | #include <plat/clkdev.h> | ||
18 | |||
19 | #endif /* __MACH_CLKDEV_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/debug-macro.S b/arch/arm/mach-spear3xx/include/mach/debug-macro.S new file mode 100644 index 000000000000..590519f10d6e --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/debug-macro.S | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header spear3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <plat/debug-macro.S> | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/entry-macro.S b/arch/arm/mach-spear3xx/include/mach/entry-macro.S new file mode 100644 index 000000000000..947625d6b48d --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/entry-macro.S | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | #include <mach/spear.h> | ||
16 | #include <asm/hardware/vic.h> | ||
17 | |||
18 | .macro disable_fiq | ||
19 | .endm | ||
20 | |||
21 | .macro get_irqnr_preamble, base, tmp | ||
22 | .endm | ||
23 | |||
24 | .macro arch_ret_to_user, tmp1, tmp2 | ||
25 | .endm | ||
26 | |||
27 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
28 | ldr \base, =VA_SPEAR3XX_ML1_VIC_BASE | ||
29 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
30 | teq \irqstat, #0 | ||
31 | beq 1001f @ this will set/reset | ||
32 | @ zero register | ||
33 | /* | ||
34 | * Following code will find bit position of least significang | ||
35 | * bit set in irqstat, using following equation | ||
36 | * least significant bit set in n = (n & ~(n-1)) | ||
37 | */ | ||
38 | sub \tmp, \irqstat, #1 @ tmp = irqstat - 1 | ||
39 | mvn \tmp, \tmp @ tmp = ~tmp | ||
40 | and \irqstat, \irqstat, \tmp @ irqstat &= tmp | ||
41 | /* Now, irqstat is = bit no. of 1st bit set in vic irq status */ | ||
42 | clz \tmp, \irqstat @ tmp = leading zeros | ||
43 | rsb \irqnr, \tmp, #0x1F @ irqnr = 32 - tmp - 1 | ||
44 | |||
45 | 1001: /* EQ will be set if no irqs pending */ | ||
46 | .endm | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h new file mode 100644 index 000000000000..af7e02c909a3 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/generic.h | |||
@@ -0,0 +1,205 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/generic.h | ||
3 | * | ||
4 | * SPEAr3XX machine family generic header file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_GENERIC_H | ||
15 | #define __MACH_GENERIC_H | ||
16 | |||
17 | #include <asm/mach/time.h> | ||
18 | #include <asm/mach/map.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/amba/bus.h> | ||
22 | #include <plat/padmux.h> | ||
23 | |||
24 | /* spear3xx declarations */ | ||
25 | /* | ||
26 | * Each GPT has 2 timer channels | ||
27 | * Following GPT channels will be used as clock source and clockevent | ||
28 | */ | ||
29 | #define SPEAR_GPT0_BASE SPEAR3XX_ML1_TMR_BASE | ||
30 | #define SPEAR_GPT0_CHAN0_IRQ IRQ_CPU_GPT1_1 | ||
31 | #define SPEAR_GPT0_CHAN1_IRQ IRQ_CPU_GPT1_2 | ||
32 | |||
33 | /* Add spear3xx family device structure declarations here */ | ||
34 | extern struct amba_device gpio_device; | ||
35 | extern struct amba_device uart_device; | ||
36 | extern struct sys_timer spear_sys_timer; | ||
37 | |||
38 | /* Add spear3xx family function declarations here */ | ||
39 | void __init clk_init(void); | ||
40 | void __init spear3xx_map_io(void); | ||
41 | void __init spear3xx_init_irq(void); | ||
42 | void __init spear3xx_init(void); | ||
43 | void spear_pmx_init(struct pmx_driver *pmx_driver, uint base, uint size); | ||
44 | |||
45 | /* pad mux declarations */ | ||
46 | #define PMX_FIRDA_MASK (1 << 14) | ||
47 | #define PMX_I2C_MASK (1 << 13) | ||
48 | #define PMX_SSP_CS_MASK (1 << 12) | ||
49 | #define PMX_SSP_MASK (1 << 11) | ||
50 | #define PMX_MII_MASK (1 << 10) | ||
51 | #define PMX_GPIO_PIN0_MASK (1 << 9) | ||
52 | #define PMX_GPIO_PIN1_MASK (1 << 8) | ||
53 | #define PMX_GPIO_PIN2_MASK (1 << 7) | ||
54 | #define PMX_GPIO_PIN3_MASK (1 << 6) | ||
55 | #define PMX_GPIO_PIN4_MASK (1 << 5) | ||
56 | #define PMX_GPIO_PIN5_MASK (1 << 4) | ||
57 | #define PMX_UART0_MODEM_MASK (1 << 3) | ||
58 | #define PMX_UART0_MASK (1 << 2) | ||
59 | #define PMX_TIMER_3_4_MASK (1 << 1) | ||
60 | #define PMX_TIMER_1_2_MASK (1 << 0) | ||
61 | |||
62 | /* pad mux devices */ | ||
63 | extern struct pmx_dev pmx_firda; | ||
64 | extern struct pmx_dev pmx_i2c; | ||
65 | extern struct pmx_dev pmx_ssp_cs; | ||
66 | extern struct pmx_dev pmx_ssp; | ||
67 | extern struct pmx_dev pmx_mii; | ||
68 | extern struct pmx_dev pmx_gpio_pin0; | ||
69 | extern struct pmx_dev pmx_gpio_pin1; | ||
70 | extern struct pmx_dev pmx_gpio_pin2; | ||
71 | extern struct pmx_dev pmx_gpio_pin3; | ||
72 | extern struct pmx_dev pmx_gpio_pin4; | ||
73 | extern struct pmx_dev pmx_gpio_pin5; | ||
74 | extern struct pmx_dev pmx_uart0_modem; | ||
75 | extern struct pmx_dev pmx_uart0; | ||
76 | extern struct pmx_dev pmx_timer_3_4; | ||
77 | extern struct pmx_dev pmx_timer_1_2; | ||
78 | |||
79 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) | ||
80 | /* padmux plgpio devices */ | ||
81 | extern struct pmx_dev pmx_plgpio_0_1; | ||
82 | extern struct pmx_dev pmx_plgpio_2_3; | ||
83 | extern struct pmx_dev pmx_plgpio_4_5; | ||
84 | extern struct pmx_dev pmx_plgpio_6_9; | ||
85 | extern struct pmx_dev pmx_plgpio_10_27; | ||
86 | extern struct pmx_dev pmx_plgpio_28; | ||
87 | extern struct pmx_dev pmx_plgpio_29; | ||
88 | extern struct pmx_dev pmx_plgpio_30; | ||
89 | extern struct pmx_dev pmx_plgpio_31; | ||
90 | extern struct pmx_dev pmx_plgpio_32; | ||
91 | extern struct pmx_dev pmx_plgpio_33; | ||
92 | extern struct pmx_dev pmx_plgpio_34_36; | ||
93 | extern struct pmx_dev pmx_plgpio_37_42; | ||
94 | extern struct pmx_dev pmx_plgpio_43_44_47_48; | ||
95 | extern struct pmx_dev pmx_plgpio_45_46_49_50; | ||
96 | #endif | ||
97 | |||
98 | extern struct pmx_driver pmx_driver; | ||
99 | |||
100 | /* spear300 declarations */ | ||
101 | #ifdef CONFIG_MACH_SPEAR300 | ||
102 | /* Add spear300 machine device structure declarations here */ | ||
103 | extern struct amba_device gpio1_device; | ||
104 | |||
105 | /* pad mux modes */ | ||
106 | extern struct pmx_mode nand_mode; | ||
107 | extern struct pmx_mode nor_mode; | ||
108 | extern struct pmx_mode photo_frame_mode; | ||
109 | extern struct pmx_mode lend_ip_phone_mode; | ||
110 | extern struct pmx_mode hend_ip_phone_mode; | ||
111 | extern struct pmx_mode lend_wifi_phone_mode; | ||
112 | extern struct pmx_mode hend_wifi_phone_mode; | ||
113 | extern struct pmx_mode ata_pabx_wi2s_mode; | ||
114 | extern struct pmx_mode ata_pabx_i2s_mode; | ||
115 | extern struct pmx_mode caml_lcdw_mode; | ||
116 | extern struct pmx_mode camu_lcd_mode; | ||
117 | extern struct pmx_mode camu_wlcd_mode; | ||
118 | extern struct pmx_mode caml_lcd_mode; | ||
119 | |||
120 | /* pad mux devices */ | ||
121 | extern struct pmx_dev pmx_fsmc_2_chips; | ||
122 | extern struct pmx_dev pmx_fsmc_4_chips; | ||
123 | extern struct pmx_dev pmx_keyboard; | ||
124 | extern struct pmx_dev pmx_clcd; | ||
125 | extern struct pmx_dev pmx_telecom_gpio; | ||
126 | extern struct pmx_dev pmx_telecom_tdm; | ||
127 | extern struct pmx_dev pmx_telecom_spi_cs_i2c_clk; | ||
128 | extern struct pmx_dev pmx_telecom_camera; | ||
129 | extern struct pmx_dev pmx_telecom_dac; | ||
130 | extern struct pmx_dev pmx_telecom_i2s; | ||
131 | extern struct pmx_dev pmx_telecom_boot_pins; | ||
132 | extern struct pmx_dev pmx_telecom_sdio_4bit; | ||
133 | extern struct pmx_dev pmx_telecom_sdio_8bit; | ||
134 | extern struct pmx_dev pmx_gpio1; | ||
135 | |||
136 | void spear300_pmx_init(void); | ||
137 | |||
138 | /* Add spear300 machine function declarations here */ | ||
139 | void __init spear300_init(void); | ||
140 | |||
141 | #endif /* CONFIG_MACH_SPEAR300 */ | ||
142 | |||
143 | /* spear310 declarations */ | ||
144 | #ifdef CONFIG_MACH_SPEAR310 | ||
145 | /* Add spear310 machine device structure declarations here */ | ||
146 | |||
147 | /* pad mux devices */ | ||
148 | extern struct pmx_dev pmx_emi_cs_0_1_4_5; | ||
149 | extern struct pmx_dev pmx_emi_cs_2_3; | ||
150 | extern struct pmx_dev pmx_uart1; | ||
151 | extern struct pmx_dev pmx_uart2; | ||
152 | extern struct pmx_dev pmx_uart3_4_5; | ||
153 | extern struct pmx_dev pmx_fsmc; | ||
154 | extern struct pmx_dev pmx_rs485_0_1; | ||
155 | extern struct pmx_dev pmx_tdm0; | ||
156 | |||
157 | void spear310_pmx_init(void); | ||
158 | |||
159 | /* Add spear310 machine function declarations here */ | ||
160 | void __init spear310_init(void); | ||
161 | |||
162 | #endif /* CONFIG_MACH_SPEAR310 */ | ||
163 | |||
164 | /* spear320 declarations */ | ||
165 | #ifdef CONFIG_MACH_SPEAR320 | ||
166 | /* Add spear320 machine device structure declarations here */ | ||
167 | |||
168 | /* pad mux modes */ | ||
169 | extern struct pmx_mode auto_net_smii_mode; | ||
170 | extern struct pmx_mode auto_net_mii_mode; | ||
171 | extern struct pmx_mode auto_exp_mode; | ||
172 | extern struct pmx_mode small_printers_mode; | ||
173 | |||
174 | /* pad mux devices */ | ||
175 | extern struct pmx_dev pmx_clcd; | ||
176 | extern struct pmx_dev pmx_emi; | ||
177 | extern struct pmx_dev pmx_fsmc; | ||
178 | extern struct pmx_dev pmx_spp; | ||
179 | extern struct pmx_dev pmx_sdio; | ||
180 | extern struct pmx_dev pmx_i2s; | ||
181 | extern struct pmx_dev pmx_uart1; | ||
182 | extern struct pmx_dev pmx_uart1_modem; | ||
183 | extern struct pmx_dev pmx_uart2; | ||
184 | extern struct pmx_dev pmx_touchscreen; | ||
185 | extern struct pmx_dev pmx_can; | ||
186 | extern struct pmx_dev pmx_sdio_led; | ||
187 | extern struct pmx_dev pmx_pwm0; | ||
188 | extern struct pmx_dev pmx_pwm1; | ||
189 | extern struct pmx_dev pmx_pwm2; | ||
190 | extern struct pmx_dev pmx_pwm3; | ||
191 | extern struct pmx_dev pmx_ssp1; | ||
192 | extern struct pmx_dev pmx_ssp2; | ||
193 | extern struct pmx_dev pmx_mii1; | ||
194 | extern struct pmx_dev pmx_smii0; | ||
195 | extern struct pmx_dev pmx_smii1; | ||
196 | extern struct pmx_dev pmx_i2c1; | ||
197 | |||
198 | void spear320_pmx_init(void); | ||
199 | |||
200 | /* Add spear320 machine function declarations here */ | ||
201 | void __init spear320_init(void); | ||
202 | |||
203 | #endif /* CONFIG_MACH_SPEAR320 */ | ||
204 | |||
205 | #endif /* __MACH_GENERIC_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/gpio.h b/arch/arm/mach-spear3xx/include/mach/gpio.h new file mode 100644 index 000000000000..451b2081bfc9 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/gpio.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/gpio.h | ||
3 | * | ||
4 | * GPIO macros for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_GPIO_H | ||
15 | #define __MACH_GPIO_H | ||
16 | |||
17 | #include <plat/gpio.h> | ||
18 | |||
19 | #endif /* __MACH_GPIO_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/hardware.h b/arch/arm/mach-spear3xx/include/mach/hardware.h new file mode 100644 index 000000000000..4a86e6a3c444 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/hardware.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/hardware.h | ||
3 | * | ||
4 | * Hardware definitions for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_HARDWARE_H | ||
15 | #define __MACH_HARDWARE_H | ||
16 | |||
17 | /* Vitual to physical translation of statically mapped space */ | ||
18 | #define IO_ADDRESS(x) (x | 0xF0000000) | ||
19 | |||
20 | #endif /* __MACH_HARDWARE_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/io.h b/arch/arm/mach-spear3xx/include/mach/io.h new file mode 100644 index 000000000000..30cff8a1f6b5 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/io.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/io.h | ||
3 | * | ||
4 | * IO definitions for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_IO_H | ||
15 | #define __MACH_IO_H | ||
16 | |||
17 | #include <plat/io.h> | ||
18 | |||
19 | #endif /* __MACH_IO_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/irqs.h b/arch/arm/mach-spear3xx/include/mach/irqs.h new file mode 100644 index 000000000000..7f940b818473 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/irqs.h | |||
@@ -0,0 +1,152 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/irqs.h | ||
3 | * | ||
4 | * IRQ helper macros for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_IRQS_H | ||
15 | #define __MACH_IRQS_H | ||
16 | |||
17 | /* SPEAr3xx IRQ definitions */ | ||
18 | #define IRQ_HW_ACCEL_MOD_0 0 | ||
19 | #define IRQ_INTRCOMM_RAS_ARM 1 | ||
20 | #define IRQ_CPU_GPT1_1 2 | ||
21 | #define IRQ_CPU_GPT1_2 3 | ||
22 | #define IRQ_BASIC_GPT1_1 4 | ||
23 | #define IRQ_BASIC_GPT1_2 5 | ||
24 | #define IRQ_BASIC_GPT2_1 6 | ||
25 | #define IRQ_BASIC_GPT2_2 7 | ||
26 | #define IRQ_BASIC_DMA 8 | ||
27 | #define IRQ_BASIC_SMI 9 | ||
28 | #define IRQ_BASIC_RTC 10 | ||
29 | #define IRQ_BASIC_GPIO 11 | ||
30 | #define IRQ_BASIC_WDT 12 | ||
31 | #define IRQ_DDR_CONTROLLER 13 | ||
32 | #define IRQ_SYS_ERROR 14 | ||
33 | #define IRQ_WAKEUP_RCV 15 | ||
34 | #define IRQ_JPEG 16 | ||
35 | #define IRQ_IRDA 17 | ||
36 | #define IRQ_ADC 18 | ||
37 | #define IRQ_UART 19 | ||
38 | #define IRQ_SSP 20 | ||
39 | #define IRQ_I2C 21 | ||
40 | #define IRQ_MAC_1 22 | ||
41 | #define IRQ_MAC_2 23 | ||
42 | #define IRQ_USB_DEV 24 | ||
43 | #define IRQ_USB_H_OHCI_0 25 | ||
44 | #define IRQ_USB_H_EHCI_0 26 | ||
45 | #define IRQ_USB_H_EHCI_1 IRQ_USB_H_EHCI_0 | ||
46 | #define IRQ_USB_H_OHCI_1 27 | ||
47 | #define IRQ_GEN_RAS_1 28 | ||
48 | #define IRQ_GEN_RAS_2 29 | ||
49 | #define IRQ_GEN_RAS_3 30 | ||
50 | #define IRQ_HW_ACCEL_MOD_1 31 | ||
51 | #define IRQ_VIC_END 32 | ||
52 | |||
53 | #define VIRQ_START IRQ_VIC_END | ||
54 | |||
55 | /* SPEAr300 Virtual irq definitions */ | ||
56 | #ifdef CONFIG_MACH_SPEAR300 | ||
57 | /* IRQs sharing IRQ_GEN_RAS_1 */ | ||
58 | #define VIRQ_IT_PERS_S (VIRQ_START + 0) | ||
59 | #define VIRQ_IT_CHANGE_S (VIRQ_START + 1) | ||
60 | #define VIRQ_I2S (VIRQ_START + 2) | ||
61 | #define VIRQ_TDM (VIRQ_START + 3) | ||
62 | #define VIRQ_CAMERA_L (VIRQ_START + 4) | ||
63 | #define VIRQ_CAMERA_F (VIRQ_START + 5) | ||
64 | #define VIRQ_CAMERA_V (VIRQ_START + 6) | ||
65 | #define VIRQ_KEYBOARD (VIRQ_START + 7) | ||
66 | #define VIRQ_GPIO1 (VIRQ_START + 8) | ||
67 | |||
68 | /* IRQs sharing IRQ_GEN_RAS_3 */ | ||
69 | #define IRQ_CLCD IRQ_GEN_RAS_3 | ||
70 | |||
71 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | ||
72 | #define IRQ_SDIO IRQ_INTRCOMM_RAS_ARM | ||
73 | |||
74 | /* GPIO pins virtual irqs */ | ||
75 | #define SPEAR_GPIO_INT_BASE (VIRQ_START + 9) | ||
76 | #define SPEAR_GPIO1_INT_BASE (SPEAR_GPIO_INT_BASE + 8) | ||
77 | #define SPEAR_GPIO_INT_END (SPEAR_GPIO1_INT_BASE + 8) | ||
78 | |||
79 | /* SPEAr310 Virtual irq definitions */ | ||
80 | #elif defined(CONFIG_MACH_SPEAR310) | ||
81 | /* IRQs sharing IRQ_GEN_RAS_1 */ | ||
82 | #define VIRQ_SMII0 (VIRQ_START + 0) | ||
83 | #define VIRQ_SMII1 (VIRQ_START + 1) | ||
84 | #define VIRQ_SMII2 (VIRQ_START + 2) | ||
85 | #define VIRQ_SMII3 (VIRQ_START + 3) | ||
86 | #define VIRQ_WAKEUP_SMII0 (VIRQ_START + 4) | ||
87 | #define VIRQ_WAKEUP_SMII1 (VIRQ_START + 5) | ||
88 | #define VIRQ_WAKEUP_SMII2 (VIRQ_START + 6) | ||
89 | #define VIRQ_WAKEUP_SMII3 (VIRQ_START + 7) | ||
90 | |||
91 | /* IRQs sharing IRQ_GEN_RAS_2 */ | ||
92 | #define VIRQ_UART1 (VIRQ_START + 8) | ||
93 | #define VIRQ_UART2 (VIRQ_START + 9) | ||
94 | #define VIRQ_UART3 (VIRQ_START + 10) | ||
95 | #define VIRQ_UART4 (VIRQ_START + 11) | ||
96 | #define VIRQ_UART5 (VIRQ_START + 12) | ||
97 | |||
98 | /* IRQs sharing IRQ_GEN_RAS_3 */ | ||
99 | #define VIRQ_EMI (VIRQ_START + 13) | ||
100 | #define VIRQ_PLGPIO (VIRQ_START + 14) | ||
101 | |||
102 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | ||
103 | #define VIRQ_TDM_HDLC (VIRQ_START + 15) | ||
104 | #define VIRQ_RS485_0 (VIRQ_START + 16) | ||
105 | #define VIRQ_RS485_1 (VIRQ_START + 17) | ||
106 | |||
107 | /* GPIO pins virtual irqs */ | ||
108 | #define SPEAR_GPIO_INT_BASE (VIRQ_START + 18) | ||
109 | |||
110 | /* SPEAr320 Virtual irq definitions */ | ||
111 | #else | ||
112 | /* IRQs sharing IRQ_GEN_RAS_1 */ | ||
113 | #define VIRQ_EMI (VIRQ_START + 0) | ||
114 | #define VIRQ_CLCD (VIRQ_START + 1) | ||
115 | #define VIRQ_SPP (VIRQ_START + 2) | ||
116 | |||
117 | /* IRQs sharing IRQ_GEN_RAS_2 */ | ||
118 | #define IRQ_SDIO IRQ_GEN_RAS_2 | ||
119 | |||
120 | /* IRQs sharing IRQ_GEN_RAS_3 */ | ||
121 | #define VIRQ_PLGPIO (VIRQ_START + 3) | ||
122 | #define VIRQ_I2S_PLAY (VIRQ_START + 4) | ||
123 | #define VIRQ_I2S_REC (VIRQ_START + 5) | ||
124 | |||
125 | /* IRQs sharing IRQ_INTRCOMM_RAS_ARM */ | ||
126 | #define VIRQ_CANU (VIRQ_START + 6) | ||
127 | #define VIRQ_CANL (VIRQ_START + 7) | ||
128 | #define VIRQ_UART1 (VIRQ_START + 8) | ||
129 | #define VIRQ_UART2 (VIRQ_START + 9) | ||
130 | #define VIRQ_SSP1 (VIRQ_START + 10) | ||
131 | #define VIRQ_SSP2 (VIRQ_START + 11) | ||
132 | #define VIRQ_SMII0 (VIRQ_START + 12) | ||
133 | #define VIRQ_MII1_SMII1 (VIRQ_START + 13) | ||
134 | #define VIRQ_WAKEUP_SMII0 (VIRQ_START + 14) | ||
135 | #define VIRQ_WAKEUP_MII1_SMII1 (VIRQ_START + 15) | ||
136 | #define VIRQ_I2C (VIRQ_START + 16) | ||
137 | |||
138 | /* GPIO pins virtual irqs */ | ||
139 | #define SPEAR_GPIO_INT_BASE (VIRQ_START + 17) | ||
140 | |||
141 | #endif | ||
142 | |||
143 | /* PLGPIO Virtual IRQs */ | ||
144 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) | ||
145 | #define SPEAR_PLGPIO_INT_BASE (SPEAR_GPIO_INT_BASE + 8) | ||
146 | #define SPEAR_GPIO_INT_END (SPEAR_PLGPIO_INT_BASE + 102) | ||
147 | #endif | ||
148 | |||
149 | #define VIRQ_END SPEAR_GPIO_INT_END | ||
150 | #define NR_IRQS VIRQ_END | ||
151 | |||
152 | #endif /* __MACH_IRQS_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/memory.h b/arch/arm/mach-spear3xx/include/mach/memory.h new file mode 100644 index 000000000000..51735221ea19 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/memory.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/memory.h | ||
3 | * | ||
4 | * Memory map for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_MEMORY_H | ||
15 | #define __MACH_MEMORY_H | ||
16 | |||
17 | #include <plat/memory.h> | ||
18 | |||
19 | #endif /* __MACH_MEMORY_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/misc_regs.h b/arch/arm/mach-spear3xx/include/mach/misc_regs.h new file mode 100644 index 000000000000..38d767a1aba0 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/misc_regs.h | |||
@@ -0,0 +1,163 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/misc_regs.h | ||
3 | * | ||
4 | * Miscellaneous registers definitions for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_MISC_REGS_H | ||
15 | #define __MACH_MISC_REGS_H | ||
16 | |||
17 | #include <mach/spear.h> | ||
18 | |||
19 | #define MISC_BASE VA_SPEAR3XX_ICM3_MISC_REG_BASE | ||
20 | |||
21 | #define SOC_CFG_CTR ((unsigned int *)(MISC_BASE + 0x000)) | ||
22 | #define DIAG_CFG_CTR ((unsigned int *)(MISC_BASE + 0x004)) | ||
23 | #define PLL1_CTR ((unsigned int *)(MISC_BASE + 0x008)) | ||
24 | #define PLL1_FRQ ((unsigned int *)(MISC_BASE + 0x00C)) | ||
25 | #define PLL1_MOD ((unsigned int *)(MISC_BASE + 0x010)) | ||
26 | #define PLL2_CTR ((unsigned int *)(MISC_BASE + 0x014)) | ||
27 | /* PLL_CTR register masks */ | ||
28 | #define PLL_ENABLE 2 | ||
29 | #define PLL_MODE_SHIFT 4 | ||
30 | #define PLL_MODE_MASK 0x3 | ||
31 | #define PLL_MODE_NORMAL 0 | ||
32 | #define PLL_MODE_FRACTION 1 | ||
33 | #define PLL_MODE_DITH_DSB 2 | ||
34 | #define PLL_MODE_DITH_SSB 3 | ||
35 | |||
36 | #define PLL2_FRQ ((unsigned int *)(MISC_BASE + 0x018)) | ||
37 | /* PLL FRQ register masks */ | ||
38 | #define PLL_DIV_N_SHIFT 0 | ||
39 | #define PLL_DIV_N_MASK 0xFF | ||
40 | #define PLL_DIV_P_SHIFT 8 | ||
41 | #define PLL_DIV_P_MASK 0x7 | ||
42 | #define PLL_NORM_FDBK_M_SHIFT 24 | ||
43 | #define PLL_NORM_FDBK_M_MASK 0xFF | ||
44 | #define PLL_DITH_FDBK_M_SHIFT 16 | ||
45 | #define PLL_DITH_FDBK_M_MASK 0xFFFF | ||
46 | |||
47 | #define PLL2_MOD ((unsigned int *)(MISC_BASE + 0x01C)) | ||
48 | #define PLL_CLK_CFG ((unsigned int *)(MISC_BASE + 0x020)) | ||
49 | #define CORE_CLK_CFG ((unsigned int *)(MISC_BASE + 0x024)) | ||
50 | /* CORE CLK CFG register masks */ | ||
51 | #define PLL_HCLK_RATIO_SHIFT 10 | ||
52 | #define PLL_HCLK_RATIO_MASK 0x3 | ||
53 | #define HCLK_PCLK_RATIO_SHIFT 8 | ||
54 | #define HCLK_PCLK_RATIO_MASK 0x3 | ||
55 | |||
56 | #define PERIP_CLK_CFG ((unsigned int *)(MISC_BASE + 0x028)) | ||
57 | /* PERIP_CLK_CFG register masks */ | ||
58 | #define UART_CLK_SHIFT 4 | ||
59 | #define UART_CLK_MASK 0x1 | ||
60 | #define FIRDA_CLK_SHIFT 5 | ||
61 | #define FIRDA_CLK_MASK 0x3 | ||
62 | #define GPT0_CLK_SHIFT 8 | ||
63 | #define GPT1_CLK_SHIFT 11 | ||
64 | #define GPT2_CLK_SHIFT 12 | ||
65 | #define GPT_CLK_MASK 0x1 | ||
66 | #define AUX_CLK_PLL3_MASK 0 | ||
67 | #define AUX_CLK_PLL1_MASK 1 | ||
68 | |||
69 | #define PERIP1_CLK_ENB ((unsigned int *)(MISC_BASE + 0x02C)) | ||
70 | /* PERIP1_CLK_ENB register masks */ | ||
71 | #define UART_CLK_ENB 3 | ||
72 | #define SSP_CLK_ENB 5 | ||
73 | #define I2C_CLK_ENB 7 | ||
74 | #define JPEG_CLK_ENB 8 | ||
75 | #define FIRDA_CLK_ENB 10 | ||
76 | #define GPT1_CLK_ENB 11 | ||
77 | #define GPT2_CLK_ENB 12 | ||
78 | #define ADC_CLK_ENB 15 | ||
79 | #define RTC_CLK_ENB 17 | ||
80 | #define GPIO_CLK_ENB 18 | ||
81 | #define DMA_CLK_ENB 19 | ||
82 | #define SMI_CLK_ENB 21 | ||
83 | #define GMAC_CLK_ENB 23 | ||
84 | #define USBD_CLK_ENB 24 | ||
85 | #define USBH_CLK_ENB 25 | ||
86 | #define C3_CLK_ENB 31 | ||
87 | |||
88 | #define SOC_CORE_ID ((unsigned int *)(MISC_BASE + 0x030)) | ||
89 | #define RAS_CLK_ENB ((unsigned int *)(MISC_BASE + 0x034)) | ||
90 | #define PERIP1_SOF_RST ((unsigned int *)(MISC_BASE + 0x038)) | ||
91 | /* PERIP1_SOF_RST register masks */ | ||
92 | #define JPEG_SOF_RST 8 | ||
93 | |||
94 | #define SOC_USER_ID ((unsigned int *)(MISC_BASE + 0x03C)) | ||
95 | #define RAS_SOF_RST ((unsigned int *)(MISC_BASE + 0x040)) | ||
96 | #define PRSC1_CLK_CFG ((unsigned int *)(MISC_BASE + 0x044)) | ||
97 | #define PRSC2_CLK_CFG ((unsigned int *)(MISC_BASE + 0x048)) | ||
98 | #define PRSC3_CLK_CFG ((unsigned int *)(MISC_BASE + 0x04C)) | ||
99 | /* gpt synthesizer register masks */ | ||
100 | #define GPT_MSCALE_SHIFT 0 | ||
101 | #define GPT_MSCALE_MASK 0xFFF | ||
102 | #define GPT_NSCALE_SHIFT 12 | ||
103 | #define GPT_NSCALE_MASK 0xF | ||
104 | |||
105 | #define AMEM_CLK_CFG ((unsigned int *)(MISC_BASE + 0x050)) | ||
106 | #define EXPI_CLK_CFG ((unsigned int *)(MISC_BASE + 0x054)) | ||
107 | #define CLCD_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x05C)) | ||
108 | #define FIRDA_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x060)) | ||
109 | #define UART_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x064)) | ||
110 | #define GMAC_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x068)) | ||
111 | #define RAS1_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x06C)) | ||
112 | #define RAS2_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x070)) | ||
113 | #define RAS3_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x074)) | ||
114 | #define RAS4_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x078)) | ||
115 | /* aux clk synthesiser register masks for irda to ras4 */ | ||
116 | #define AUX_EQ_SEL_SHIFT 30 | ||
117 | #define AUX_EQ_SEL_MASK 1 | ||
118 | #define AUX_EQ1_SEL 0 | ||
119 | #define AUX_EQ2_SEL 1 | ||
120 | #define AUX_XSCALE_SHIFT 16 | ||
121 | #define AUX_XSCALE_MASK 0xFFF | ||
122 | #define AUX_YSCALE_SHIFT 0 | ||
123 | #define AUX_YSCALE_MASK 0xFFF | ||
124 | |||
125 | #define ICM1_ARB_CFG ((unsigned int *)(MISC_BASE + 0x07C)) | ||
126 | #define ICM2_ARB_CFG ((unsigned int *)(MISC_BASE + 0x080)) | ||
127 | #define ICM3_ARB_CFG ((unsigned int *)(MISC_BASE + 0x084)) | ||
128 | #define ICM4_ARB_CFG ((unsigned int *)(MISC_BASE + 0x088)) | ||
129 | #define ICM5_ARB_CFG ((unsigned int *)(MISC_BASE + 0x08C)) | ||
130 | #define ICM6_ARB_CFG ((unsigned int *)(MISC_BASE + 0x090)) | ||
131 | #define ICM7_ARB_CFG ((unsigned int *)(MISC_BASE + 0x094)) | ||
132 | #define ICM8_ARB_CFG ((unsigned int *)(MISC_BASE + 0x098)) | ||
133 | #define ICM9_ARB_CFG ((unsigned int *)(MISC_BASE + 0x09C)) | ||
134 | #define DMA_CHN_CFG ((unsigned int *)(MISC_BASE + 0x0A0)) | ||
135 | #define USB2_PHY_CFG ((unsigned int *)(MISC_BASE + 0x0A4)) | ||
136 | #define GMAC_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0A8)) | ||
137 | #define EXPI_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0AC)) | ||
138 | #define PRC1_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0C0)) | ||
139 | #define PRC2_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0C4)) | ||
140 | #define PRC3_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0C8)) | ||
141 | #define PRC4_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0CC)) | ||
142 | #define PRC1_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0D0)) | ||
143 | #define PRC2_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0D4)) | ||
144 | #define PRC3_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0D8)) | ||
145 | #define PRC4_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0DC)) | ||
146 | #define PWRDOWN_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0E0)) | ||
147 | #define COMPSSTL_1V8_CFG ((unsigned int *)(MISC_BASE + 0x0E4)) | ||
148 | #define COMPSSTL_2V5_CFG ((unsigned int *)(MISC_BASE + 0x0E8)) | ||
149 | #define COMPCOR_3V3_CFG ((unsigned int *)(MISC_BASE + 0x0EC)) | ||
150 | #define SSTLPAD_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0F0)) | ||
151 | #define BIST1_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0F4)) | ||
152 | #define BIST2_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0F8)) | ||
153 | #define BIST3_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0FC)) | ||
154 | #define BIST4_CFG_CTR ((unsigned int *)(MISC_BASE + 0x100)) | ||
155 | #define BIST5_CFG_CTR ((unsigned int *)(MISC_BASE + 0x104)) | ||
156 | #define BIST1_STS_RES ((unsigned int *)(MISC_BASE + 0x108)) | ||
157 | #define BIST2_STS_RES ((unsigned int *)(MISC_BASE + 0x10C)) | ||
158 | #define BIST3_STS_RES ((unsigned int *)(MISC_BASE + 0x110)) | ||
159 | #define BIST4_STS_RES ((unsigned int *)(MISC_BASE + 0x114)) | ||
160 | #define BIST5_STS_RES ((unsigned int *)(MISC_BASE + 0x118)) | ||
161 | #define SYSERR_CFG_CTR ((unsigned int *)(MISC_BASE + 0x11C)) | ||
162 | |||
163 | #endif /* __MACH_MISC_REGS_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/spear.h b/arch/arm/mach-spear3xx/include/mach/spear.h new file mode 100644 index 000000000000..dcca8568a486 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/spear.h | |||
@@ -0,0 +1,144 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/spear.h | ||
3 | * | ||
4 | * SPEAr3xx Machine family specific definition | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_SPEAR3XX_H | ||
15 | #define __MACH_SPEAR3XX_H | ||
16 | |||
17 | #include <mach/hardware.h> | ||
18 | #include <mach/spear300.h> | ||
19 | #include <mach/spear310.h> | ||
20 | #include <mach/spear320.h> | ||
21 | |||
22 | #define SPEAR3XX_ML_SDRAM_BASE 0x00000000 | ||
23 | #define SPEAR3XX_ML_SDRAM_SIZE 0x40000000 | ||
24 | |||
25 | #define SPEAR3XX_ICM9_BASE 0xC0000000 | ||
26 | #define SPEAR3XX_ICM9_SIZE 0x10000000 | ||
27 | |||
28 | /* ICM1 - Low speed connection */ | ||
29 | #define SPEAR3XX_ICM1_2_BASE 0xD0000000 | ||
30 | #define SPEAR3XX_ICM1_2_SIZE 0x10000000 | ||
31 | |||
32 | #define SPEAR3XX_ICM1_UART_BASE 0xD0000000 | ||
33 | #define VA_SPEAR3XX_ICM1_UART_BASE IO_ADDRESS(SPEAR3XX_ICM1_UART_BASE) | ||
34 | #define SPEAR3XX_ICM1_UART_SIZE 0x00080000 | ||
35 | |||
36 | #define SPEAR3XX_ICM1_ADC_BASE 0xD0080000 | ||
37 | #define SPEAR3XX_ICM1_ADC_SIZE 0x00080000 | ||
38 | |||
39 | #define SPEAR3XX_ICM1_SSP_BASE 0xD0100000 | ||
40 | #define SPEAR3XX_ICM1_SSP_SIZE 0x00080000 | ||
41 | |||
42 | #define SPEAR3XX_ICM1_I2C_BASE 0xD0180000 | ||
43 | #define SPEAR3XX_ICM1_I2C_SIZE 0x00080000 | ||
44 | |||
45 | #define SPEAR3XX_ICM1_JPEG_BASE 0xD0800000 | ||
46 | #define SPEAR3XX_ICM1_JPEG_SIZE 0x00800000 | ||
47 | |||
48 | #define SPEAR3XX_ICM1_IRDA_BASE 0xD1000000 | ||
49 | #define SPEAR3XX_ICM1_IRDA_SIZE 0x00080000 | ||
50 | |||
51 | #define SPEAR3XX_ICM1_SRAM_BASE 0xD2800000 | ||
52 | #define SPEAR3XX_ICM1_SRAM_SIZE 0x05800000 | ||
53 | |||
54 | /* ICM2 - Application Subsystem */ | ||
55 | #define SPEAR3XX_ICM2_HWACCEL0_BASE 0xD8800000 | ||
56 | #define SPEAR3XX_ICM2_HWACCEL0_SIZE 0x00800000 | ||
57 | |||
58 | #define SPEAR3XX_ICM2_HWACCEL1_BASE 0xD9000000 | ||
59 | #define SPEAR3XX_ICM2_HWACCEL1_SIZE 0x00800000 | ||
60 | |||
61 | /* ICM4 - High Speed Connection */ | ||
62 | #define SPEAR3XX_ICM4_BASE 0xE0000000 | ||
63 | #define SPEAR3XX_ICM4_SIZE 0x08000000 | ||
64 | |||
65 | #define SPEAR3XX_ICM4_MII_BASE 0xE0800000 | ||
66 | #define SPEAR3XX_ICM4_MII_SIZE 0x00800000 | ||
67 | |||
68 | #define SPEAR3XX_ICM4_USBD_FIFO_BASE 0xE1000000 | ||
69 | #define SPEAR3XX_ICM4_USBD_FIFO_SIZE 0x00100000 | ||
70 | |||
71 | #define SPEAR3XX_ICM4_USBD_CSR_BASE 0xE1100000 | ||
72 | #define SPEAR3XX_ICM4_USBD_CSR_SIZE 0x00100000 | ||
73 | |||
74 | #define SPEAR3XX_ICM4_USBD_PLDT_BASE 0xE1200000 | ||
75 | #define SPEAR3XX_ICM4_USBD_PLDT_SIZE 0x00100000 | ||
76 | |||
77 | #define SPEAR3XX_ICM4_USB_EHCI0_1_BASE 0xE1800000 | ||
78 | #define SPEAR3XX_ICM4_USB_EHCI0_1_SIZE 0x00100000 | ||
79 | |||
80 | #define SPEAR3XX_ICM4_USB_OHCI0_BASE 0xE1900000 | ||
81 | #define SPEAR3XX_ICM4_USB_OHCI0_SIZE 0x00100000 | ||
82 | |||
83 | #define SPEAR3XX_ICM4_USB_OHCI1_BASE 0xE2100000 | ||
84 | #define SPEAR3XX_ICM4_USB_OHCI1_SIZE 0x00100000 | ||
85 | |||
86 | #define SPEAR3XX_ICM4_USB_ARB_BASE 0xE2800000 | ||
87 | #define SPEAR3XX_ICM4_USB_ARB_SIZE 0x00010000 | ||
88 | |||
89 | /* ML1 - Multi Layer CPU Subsystem */ | ||
90 | #define SPEAR3XX_ICM3_ML1_2_BASE 0xF0000000 | ||
91 | #define SPEAR3XX_ICM3_ML1_2_SIZE 0x0F000000 | ||
92 | |||
93 | #define SPEAR3XX_ML1_TMR_BASE 0xF0000000 | ||
94 | #define SPEAR3XX_ML1_TMR_SIZE 0x00100000 | ||
95 | |||
96 | #define SPEAR3XX_ML1_VIC_BASE 0xF1100000 | ||
97 | #define VA_SPEAR3XX_ML1_VIC_BASE IO_ADDRESS(SPEAR3XX_ML1_VIC_BASE) | ||
98 | #define SPEAR3XX_ML1_VIC_SIZE 0x00100000 | ||
99 | |||
100 | /* ICM3 - Basic Subsystem */ | ||
101 | #define SPEAR3XX_ICM3_SMEM_BASE 0xF8000000 | ||
102 | #define SPEAR3XX_ICM3_SMEM_SIZE 0x04000000 | ||
103 | |||
104 | #define SPEAR3XX_ICM3_SMI_CTRL_BASE 0xFC000000 | ||
105 | #define SPEAR3XX_ICM3_SMI_CTRL_SIZE 0x00200000 | ||
106 | |||
107 | #define SPEAR3XX_ICM3_DMA_BASE 0xFC400000 | ||
108 | #define SPEAR3XX_ICM3_DMA_SIZE 0x00200000 | ||
109 | |||
110 | #define SPEAR3XX_ICM3_SDRAM_CTRL_BASE 0xFC600000 | ||
111 | #define SPEAR3XX_ICM3_SDRAM_CTRL_SIZE 0x00200000 | ||
112 | |||
113 | #define SPEAR3XX_ICM3_TMR0_BASE 0xFC800000 | ||
114 | #define SPEAR3XX_ICM3_TMR0_SIZE 0x00080000 | ||
115 | |||
116 | #define SPEAR3XX_ICM3_WDT_BASE 0xFC880000 | ||
117 | #define SPEAR3XX_ICM3_WDT_SIZE 0x00080000 | ||
118 | |||
119 | #define SPEAR3XX_ICM3_RTC_BASE 0xFC900000 | ||
120 | #define SPEAR3XX_ICM3_RTC_SIZE 0x00080000 | ||
121 | |||
122 | #define SPEAR3XX_ICM3_GPIO_BASE 0xFC980000 | ||
123 | #define SPEAR3XX_ICM3_GPIO_SIZE 0x00080000 | ||
124 | |||
125 | #define SPEAR3XX_ICM3_SYS_CTRL_BASE 0xFCA00000 | ||
126 | #define VA_SPEAR3XX_ICM3_SYS_CTRL_BASE IO_ADDRESS(SPEAR3XX_ICM3_SYS_CTRL_BASE) | ||
127 | #define SPEAR3XX_ICM3_SYS_CTRL_SIZE 0x00080000 | ||
128 | |||
129 | #define SPEAR3XX_ICM3_MISC_REG_BASE 0xFCA80000 | ||
130 | #define VA_SPEAR3XX_ICM3_MISC_REG_BASE IO_ADDRESS(SPEAR3XX_ICM3_MISC_REG_BASE) | ||
131 | #define SPEAR3XX_ICM3_MISC_REG_SIZE 0x00080000 | ||
132 | |||
133 | #define SPEAR3XX_ICM3_TMR1_BASE 0xFCB00000 | ||
134 | #define SPEAR3XX_ICM3_TMR1_SIZE 0x00080000 | ||
135 | |||
136 | /* Debug uart for linux, will be used for debug and uncompress messages */ | ||
137 | #define SPEAR_DBG_UART_BASE SPEAR3XX_ICM1_UART_BASE | ||
138 | #define VA_SPEAR_DBG_UART_BASE VA_SPEAR3XX_ICM1_UART_BASE | ||
139 | |||
140 | /* Sysctl base for spear platform */ | ||
141 | #define SPEAR_SYS_CTRL_BASE SPEAR3XX_ICM3_SYS_CTRL_BASE | ||
142 | #define VA_SPEAR_SYS_CTRL_BASE VA_SPEAR3XX_ICM3_SYS_CTRL_BASE | ||
143 | |||
144 | #endif /* __MACH_SPEAR3XX_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/spear300.h b/arch/arm/mach-spear3xx/include/mach/spear300.h new file mode 100644 index 000000000000..ccaa76522ee2 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/spear300.h | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/spear300.h | ||
3 | * | ||
4 | * SPEAr300 Machine specific definition | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef CONFIG_MACH_SPEAR300 | ||
15 | |||
16 | #ifndef __MACH_SPEAR300_H | ||
17 | #define __MACH_SPEAR300_H | ||
18 | |||
19 | /* Base address of various IPs */ | ||
20 | #define SPEAR300_TELECOM_BASE 0x50000000 | ||
21 | #define SPEAR300_TELECOM_SIZE 0x10000000 | ||
22 | |||
23 | /* Interrupt registers offsets and masks */ | ||
24 | #define SPEAR300_TELECOM_REG_SIZE 0x00010000 | ||
25 | #define INT_ENB_MASK_REG 0x54 | ||
26 | #define INT_STS_MASK_REG 0x58 | ||
27 | #define IT_PERS_S_IRQ_MASK (1 << 0) | ||
28 | #define IT_CHANGE_S_IRQ_MASK (1 << 1) | ||
29 | #define I2S_IRQ_MASK (1 << 2) | ||
30 | #define TDM_IRQ_MASK (1 << 3) | ||
31 | #define CAMERA_L_IRQ_MASK (1 << 4) | ||
32 | #define CAMERA_F_IRQ_MASK (1 << 5) | ||
33 | #define CAMERA_V_IRQ_MASK (1 << 6) | ||
34 | #define KEYBOARD_IRQ_MASK (1 << 7) | ||
35 | #define GPIO1_IRQ_MASK (1 << 8) | ||
36 | |||
37 | #define SHIRQ_RAS1_MASK 0x1FF | ||
38 | |||
39 | #define SPEAR300_CLCD_BASE 0x60000000 | ||
40 | #define SPEAR300_CLCD_SIZE 0x10000000 | ||
41 | |||
42 | #define SPEAR300_SDIO_BASE 0x70000000 | ||
43 | #define SPEAR300_SDIO_SIZE 0x10000000 | ||
44 | |||
45 | #define SPEAR300_NAND_0_BASE 0x80000000 | ||
46 | #define SPEAR300_NAND_0_SIZE 0x04000000 | ||
47 | |||
48 | #define SPEAR300_NAND_1_BASE 0x84000000 | ||
49 | #define SPEAR300_NAND_1_SIZE 0x04000000 | ||
50 | |||
51 | #define SPEAR300_NAND_2_BASE 0x88000000 | ||
52 | #define SPEAR300_NAND_2_SIZE 0x04000000 | ||
53 | |||
54 | #define SPEAR300_NAND_3_BASE 0x8c000000 | ||
55 | #define SPEAR300_NAND_3_SIZE 0x04000000 | ||
56 | |||
57 | #define SPEAR300_NOR_0_BASE 0x90000000 | ||
58 | #define SPEAR300_NOR_0_SIZE 0x01000000 | ||
59 | |||
60 | #define SPEAR300_NOR_1_BASE 0x91000000 | ||
61 | #define SPEAR300_NOR_1_SIZE 0x01000000 | ||
62 | |||
63 | #define SPEAR300_NOR_2_BASE 0x92000000 | ||
64 | #define SPEAR300_NOR_2_SIZE 0x01000000 | ||
65 | |||
66 | #define SPEAR300_NOR_3_BASE 0x93000000 | ||
67 | #define SPEAR300_NOR_3_SIZE 0x01000000 | ||
68 | |||
69 | #define SPEAR300_FSMC_BASE 0x94000000 | ||
70 | #define SPEAR300_FSMC_SIZE 0x05000000 | ||
71 | |||
72 | #define SPEAR300_SOC_CONFIG_BASE 0x99000000 | ||
73 | #define SPEAR300_SOC_CONFIG_SIZE 0x00000008 | ||
74 | |||
75 | #define SPEAR300_KEYBOARD_BASE 0xA0000000 | ||
76 | #define SPEAR300_KEYBOARD_SIZE 0x09000000 | ||
77 | |||
78 | #define SPEAR300_GPIO_BASE 0xA9000000 | ||
79 | #define SPEAR300_GPIO_SIZE 0x07000000 | ||
80 | |||
81 | #endif /* __MACH_SPEAR300_H */ | ||
82 | |||
83 | #endif /* CONFIG_MACH_SPEAR300 */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/spear310.h b/arch/arm/mach-spear3xx/include/mach/spear310.h new file mode 100644 index 000000000000..b27bb8af3309 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/spear310.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/spear310.h | ||
3 | * | ||
4 | * SPEAr310 Machine specific definition | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef CONFIG_MACH_SPEAR310 | ||
15 | |||
16 | #ifndef __MACH_SPEAR310_H | ||
17 | #define __MACH_SPEAR310_H | ||
18 | |||
19 | #define SPEAR310_NAND_BASE 0x40000000 | ||
20 | #define SPEAR310_NAND_SIZE 0x04000000 | ||
21 | |||
22 | #define SPEAR310_FSMC_BASE 0x44000000 | ||
23 | #define SPEAR310_FSMC_SIZE 0x01000000 | ||
24 | |||
25 | #define SPEAR310_UART1_BASE 0xB2000000 | ||
26 | #define SPEAR310_UART2_BASE 0xB2080000 | ||
27 | #define SPEAR310_UART3_BASE 0xB2100000 | ||
28 | #define SPEAR310_UART4_BASE 0xB2180000 | ||
29 | #define SPEAR310_UART5_BASE 0xB2200000 | ||
30 | #define SPEAR310_UART_SIZE 0x00080000 | ||
31 | |||
32 | #define SPEAR310_HDLC_BASE 0xB2800000 | ||
33 | #define SPEAR310_HDLC_SIZE 0x00800000 | ||
34 | |||
35 | #define SPEAR310_RS485_0_BASE 0xB3000000 | ||
36 | #define SPEAR310_RS485_0_SIZE 0x00800000 | ||
37 | |||
38 | #define SPEAR310_RS485_1_BASE 0xB3800000 | ||
39 | #define SPEAR310_RS485_1_SIZE 0x00800000 | ||
40 | |||
41 | #define SPEAR310_SOC_CONFIG_BASE 0xB4000000 | ||
42 | #define SPEAR310_SOC_CONFIG_SIZE 0x00000070 | ||
43 | /* Interrupt registers offsets and masks */ | ||
44 | #define INT_STS_MASK_REG 0x04 | ||
45 | #define SMII0_IRQ_MASK (1 << 0) | ||
46 | #define SMII1_IRQ_MASK (1 << 1) | ||
47 | #define SMII2_IRQ_MASK (1 << 2) | ||
48 | #define SMII3_IRQ_MASK (1 << 3) | ||
49 | #define WAKEUP_SMII0_IRQ_MASK (1 << 4) | ||
50 | #define WAKEUP_SMII1_IRQ_MASK (1 << 5) | ||
51 | #define WAKEUP_SMII2_IRQ_MASK (1 << 6) | ||
52 | #define WAKEUP_SMII3_IRQ_MASK (1 << 7) | ||
53 | #define UART1_IRQ_MASK (1 << 8) | ||
54 | #define UART2_IRQ_MASK (1 << 9) | ||
55 | #define UART3_IRQ_MASK (1 << 10) | ||
56 | #define UART4_IRQ_MASK (1 << 11) | ||
57 | #define UART5_IRQ_MASK (1 << 12) | ||
58 | #define EMI_IRQ_MASK (1 << 13) | ||
59 | #define TDM_HDLC_IRQ_MASK (1 << 14) | ||
60 | #define RS485_0_IRQ_MASK (1 << 15) | ||
61 | #define RS485_1_IRQ_MASK (1 << 16) | ||
62 | |||
63 | #define SHIRQ_RAS1_MASK 0x000FF | ||
64 | #define SHIRQ_RAS2_MASK 0x01F00 | ||
65 | #define SHIRQ_RAS3_MASK 0x02000 | ||
66 | #define SHIRQ_INTRCOMM_RAS_MASK 0x1C000 | ||
67 | |||
68 | #endif /* __MACH_SPEAR310_H */ | ||
69 | |||
70 | #endif /* CONFIG_MACH_SPEAR310 */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/spear320.h b/arch/arm/mach-spear3xx/include/mach/spear320.h new file mode 100644 index 000000000000..cacf17a958cd --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/spear320.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/spear320.h | ||
3 | * | ||
4 | * SPEAr320 Machine specific definition | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef CONFIG_MACH_SPEAR320 | ||
15 | |||
16 | #ifndef __MACH_SPEAR320_H | ||
17 | #define __MACH_SPEAR320_H | ||
18 | |||
19 | #define SPEAR320_EMI_CTRL_BASE 0x40000000 | ||
20 | #define SPEAR320_EMI_CTRL_SIZE 0x08000000 | ||
21 | |||
22 | #define SPEAR320_FSMC_BASE 0x4C000000 | ||
23 | #define SPEAR320_FSMC_SIZE 0x01000000 | ||
24 | |||
25 | #define SPEAR320_I2S_BASE 0x60000000 | ||
26 | #define SPEAR320_I2S_SIZE 0x10000000 | ||
27 | |||
28 | #define SPEAR320_SDIO_BASE 0x70000000 | ||
29 | #define SPEAR320_SDIO_SIZE 0x10000000 | ||
30 | |||
31 | #define SPEAR320_CLCD_BASE 0x90000000 | ||
32 | #define SPEAR320_CLCD_SIZE 0x10000000 | ||
33 | |||
34 | #define SPEAR320_PAR_PORT_BASE 0xA0000000 | ||
35 | #define SPEAR320_PAR_PORT_SIZE 0x01000000 | ||
36 | |||
37 | #define SPEAR320_CAN0_BASE 0xA1000000 | ||
38 | #define SPEAR320_CAN0_SIZE 0x01000000 | ||
39 | |||
40 | #define SPEAR320_CAN1_BASE 0xA2000000 | ||
41 | #define SPEAR320_CAN1_SIZE 0x01000000 | ||
42 | |||
43 | #define SPEAR320_UART1_BASE 0xA3000000 | ||
44 | #define SPEAR320_UART2_BASE 0xA4000000 | ||
45 | #define SPEAR320_UART_SIZE 0x01000000 | ||
46 | |||
47 | #define SPEAR320_SSP0_BASE 0xA5000000 | ||
48 | #define SPEAR320_SSP0_SIZE 0x01000000 | ||
49 | |||
50 | #define SPEAR320_SSP1_BASE 0xA6000000 | ||
51 | #define SPEAR320_SSP1_SIZE 0x01000000 | ||
52 | |||
53 | #define SPEAR320_I2C_BASE 0xA7000000 | ||
54 | #define SPEAR320_I2C_SIZE 0x01000000 | ||
55 | |||
56 | #define SPEAR320_PWM_BASE 0xA8000000 | ||
57 | #define SPEAR320_PWM_SIZE 0x01000000 | ||
58 | |||
59 | #define SPEAR320_SMII0_BASE 0xAA000000 | ||
60 | #define SPEAR320_SMII0_SIZE 0x01000000 | ||
61 | |||
62 | #define SPEAR320_SMII1_BASE 0xAB000000 | ||
63 | #define SPEAR320_SMII1_SIZE 0x01000000 | ||
64 | |||
65 | #define SPEAR320_SOC_CONFIG_BASE 0xB4000000 | ||
66 | #define SPEAR320_SOC_CONFIG_SIZE 0x00000070 | ||
67 | /* Interrupt registers offsets and masks */ | ||
68 | #define INT_STS_MASK_REG 0x04 | ||
69 | #define INT_CLR_MASK_REG 0x04 | ||
70 | #define INT_ENB_MASK_REG 0x08 | ||
71 | #define GPIO_IRQ_MASK (1 << 0) | ||
72 | #define I2S_PLAY_IRQ_MASK (1 << 1) | ||
73 | #define I2S_REC_IRQ_MASK (1 << 2) | ||
74 | #define EMI_IRQ_MASK (1 << 7) | ||
75 | #define CLCD_IRQ_MASK (1 << 8) | ||
76 | #define SPP_IRQ_MASK (1 << 9) | ||
77 | #define SDIO_IRQ_MASK (1 << 10) | ||
78 | #define CAN_U_IRQ_MASK (1 << 11) | ||
79 | #define CAN_L_IRQ_MASK (1 << 12) | ||
80 | #define UART1_IRQ_MASK (1 << 13) | ||
81 | #define UART2_IRQ_MASK (1 << 14) | ||
82 | #define SSP1_IRQ_MASK (1 << 15) | ||
83 | #define SSP2_IRQ_MASK (1 << 16) | ||
84 | #define SMII0_IRQ_MASK (1 << 17) | ||
85 | #define MII1_SMII1_IRQ_MASK (1 << 18) | ||
86 | #define WAKEUP_SMII0_IRQ_MASK (1 << 19) | ||
87 | #define WAKEUP_MII1_SMII1_IRQ_MASK (1 << 20) | ||
88 | #define I2C1_IRQ_MASK (1 << 21) | ||
89 | |||
90 | #define SHIRQ_RAS1_MASK 0x000380 | ||
91 | #define SHIRQ_RAS3_MASK 0x000007 | ||
92 | #define SHIRQ_INTRCOMM_RAS_MASK 0x3FF800 | ||
93 | |||
94 | #endif /* __MACH_SPEAR320_H */ | ||
95 | |||
96 | #endif /* CONFIG_MACH_SPEAR320 */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/system.h b/arch/arm/mach-spear3xx/include/mach/system.h new file mode 100644 index 000000000000..92cee6335c90 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/system.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/system.h | ||
3 | * | ||
4 | * SPEAr3xx Machine family specific architecture functions | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_SYSTEM_H | ||
15 | #define __MACH_SYSTEM_H | ||
16 | |||
17 | #include <plat/system.h> | ||
18 | |||
19 | #endif /* __MACH_SYSTEM_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/timex.h b/arch/arm/mach-spear3xx/include/mach/timex.h new file mode 100644 index 000000000000..a38cc9de876f --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/timex.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/timex.h | ||
3 | * | ||
4 | * SPEAr3XX machine family specific timex definitions | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_TIMEX_H | ||
15 | #define __MACH_TIMEX_H | ||
16 | |||
17 | #include <plat/timex.h> | ||
18 | |||
19 | #endif /* __MACH_TIMEX_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/uncompress.h b/arch/arm/mach-spear3xx/include/mach/uncompress.h new file mode 100644 index 000000000000..53ba8bbc0dfa --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/uncompress.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/uncompress.h | ||
3 | * | ||
4 | * Serial port stubs for kernel decompress status messages | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_UNCOMPRESS_H | ||
15 | #define __MACH_UNCOMPRESS_H | ||
16 | |||
17 | #include <plat/uncompress.h> | ||
18 | |||
19 | #endif /* __MACH_UNCOMPRESS_H */ | ||
diff --git a/arch/arm/mach-spear3xx/include/mach/vmalloc.h b/arch/arm/mach-spear3xx/include/mach/vmalloc.h new file mode 100644 index 000000000000..df977b3c9a63 --- /dev/null +++ b/arch/arm/mach-spear3xx/include/mach/vmalloc.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Defining Vmalloc area for SPEAr3xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_VMALLOC_H | ||
15 | #define __MACH_VMALLOC_H | ||
16 | |||
17 | #include <plat/vmalloc.h> | ||
18 | |||
19 | #endif /* __MACH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c new file mode 100644 index 000000000000..3560f8c1e723 --- /dev/null +++ b/arch/arm/mach-spear3xx/spear300.c | |||
@@ -0,0 +1,468 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/spear300.c | ||
3 | * | ||
4 | * SPEAr300 machine source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | #include <linux/amba/pl061.h> | ||
16 | #include <linux/ptrace.h> | ||
17 | #include <asm/irq.h> | ||
18 | #include <mach/generic.h> | ||
19 | #include <mach/spear.h> | ||
20 | #include <plat/shirq.h> | ||
21 | |||
22 | /* pad multiplexing support */ | ||
23 | /* muxing registers */ | ||
24 | #define PAD_MUX_CONFIG_REG 0x00 | ||
25 | #define MODE_CONFIG_REG 0x04 | ||
26 | |||
27 | /* modes */ | ||
28 | #define NAND_MODE (1 << 0) | ||
29 | #define NOR_MODE (1 << 1) | ||
30 | #define PHOTO_FRAME_MODE (1 << 2) | ||
31 | #define LEND_IP_PHONE_MODE (1 << 3) | ||
32 | #define HEND_IP_PHONE_MODE (1 << 4) | ||
33 | #define LEND_WIFI_PHONE_MODE (1 << 5) | ||
34 | #define HEND_WIFI_PHONE_MODE (1 << 6) | ||
35 | #define ATA_PABX_WI2S_MODE (1 << 7) | ||
36 | #define ATA_PABX_I2S_MODE (1 << 8) | ||
37 | #define CAML_LCDW_MODE (1 << 9) | ||
38 | #define CAMU_LCD_MODE (1 << 10) | ||
39 | #define CAMU_WLCD_MODE (1 << 11) | ||
40 | #define CAML_LCD_MODE (1 << 12) | ||
41 | #define ALL_MODES 0x1FFF | ||
42 | |||
43 | struct pmx_mode nand_mode = { | ||
44 | .id = NAND_MODE, | ||
45 | .name = "nand mode", | ||
46 | .mask = 0x00, | ||
47 | }; | ||
48 | |||
49 | struct pmx_mode nor_mode = { | ||
50 | .id = NOR_MODE, | ||
51 | .name = "nor mode", | ||
52 | .mask = 0x01, | ||
53 | }; | ||
54 | |||
55 | struct pmx_mode photo_frame_mode = { | ||
56 | .id = PHOTO_FRAME_MODE, | ||
57 | .name = "photo frame mode", | ||
58 | .mask = 0x02, | ||
59 | }; | ||
60 | |||
61 | struct pmx_mode lend_ip_phone_mode = { | ||
62 | .id = LEND_IP_PHONE_MODE, | ||
63 | .name = "lend ip phone mode", | ||
64 | .mask = 0x03, | ||
65 | }; | ||
66 | |||
67 | struct pmx_mode hend_ip_phone_mode = { | ||
68 | .id = HEND_IP_PHONE_MODE, | ||
69 | .name = "hend ip phone mode", | ||
70 | .mask = 0x04, | ||
71 | }; | ||
72 | |||
73 | struct pmx_mode lend_wifi_phone_mode = { | ||
74 | .id = LEND_WIFI_PHONE_MODE, | ||
75 | .name = "lend wifi phone mode", | ||
76 | .mask = 0x05, | ||
77 | }; | ||
78 | |||
79 | struct pmx_mode hend_wifi_phone_mode = { | ||
80 | .id = HEND_WIFI_PHONE_MODE, | ||
81 | .name = "hend wifi phone mode", | ||
82 | .mask = 0x06, | ||
83 | }; | ||
84 | |||
85 | struct pmx_mode ata_pabx_wi2s_mode = { | ||
86 | .id = ATA_PABX_WI2S_MODE, | ||
87 | .name = "ata pabx wi2s mode", | ||
88 | .mask = 0x07, | ||
89 | }; | ||
90 | |||
91 | struct pmx_mode ata_pabx_i2s_mode = { | ||
92 | .id = ATA_PABX_I2S_MODE, | ||
93 | .name = "ata pabx i2s mode", | ||
94 | .mask = 0x08, | ||
95 | }; | ||
96 | |||
97 | struct pmx_mode caml_lcdw_mode = { | ||
98 | .id = CAML_LCDW_MODE, | ||
99 | .name = "caml lcdw mode", | ||
100 | .mask = 0x0C, | ||
101 | }; | ||
102 | |||
103 | struct pmx_mode camu_lcd_mode = { | ||
104 | .id = CAMU_LCD_MODE, | ||
105 | .name = "camu lcd mode", | ||
106 | .mask = 0x0D, | ||
107 | }; | ||
108 | |||
109 | struct pmx_mode camu_wlcd_mode = { | ||
110 | .id = CAMU_WLCD_MODE, | ||
111 | .name = "camu wlcd mode", | ||
112 | .mask = 0x0E, | ||
113 | }; | ||
114 | |||
115 | struct pmx_mode caml_lcd_mode = { | ||
116 | .id = CAML_LCD_MODE, | ||
117 | .name = "caml lcd mode", | ||
118 | .mask = 0x0F, | ||
119 | }; | ||
120 | |||
121 | /* devices */ | ||
122 | struct pmx_dev_mode pmx_fsmc_2_chips_modes[] = { | ||
123 | { | ||
124 | .ids = NAND_MODE | NOR_MODE | PHOTO_FRAME_MODE | | ||
125 | ATA_PABX_WI2S_MODE | ATA_PABX_I2S_MODE, | ||
126 | .mask = PMX_FIRDA_MASK, | ||
127 | }, | ||
128 | }; | ||
129 | |||
130 | struct pmx_dev pmx_fsmc_2_chips = { | ||
131 | .name = "fsmc_2_chips", | ||
132 | .modes = pmx_fsmc_2_chips_modes, | ||
133 | .mode_count = ARRAY_SIZE(pmx_fsmc_2_chips_modes), | ||
134 | .enb_on_reset = 1, | ||
135 | }; | ||
136 | |||
137 | struct pmx_dev_mode pmx_fsmc_4_chips_modes[] = { | ||
138 | { | ||
139 | .ids = NAND_MODE | NOR_MODE | PHOTO_FRAME_MODE | | ||
140 | ATA_PABX_WI2S_MODE | ATA_PABX_I2S_MODE, | ||
141 | .mask = PMX_FIRDA_MASK | PMX_UART0_MASK, | ||
142 | }, | ||
143 | }; | ||
144 | |||
145 | struct pmx_dev pmx_fsmc_4_chips = { | ||
146 | .name = "fsmc_4_chips", | ||
147 | .modes = pmx_fsmc_4_chips_modes, | ||
148 | .mode_count = ARRAY_SIZE(pmx_fsmc_4_chips_modes), | ||
149 | .enb_on_reset = 1, | ||
150 | }; | ||
151 | |||
152 | struct pmx_dev_mode pmx_keyboard_modes[] = { | ||
153 | { | ||
154 | .ids = LEND_IP_PHONE_MODE | HEND_IP_PHONE_MODE | | ||
155 | LEND_WIFI_PHONE_MODE | HEND_WIFI_PHONE_MODE | | ||
156 | CAML_LCDW_MODE | CAMU_LCD_MODE | CAMU_WLCD_MODE | | ||
157 | CAML_LCD_MODE, | ||
158 | .mask = 0x0, | ||
159 | }, | ||
160 | }; | ||
161 | |||
162 | struct pmx_dev pmx_keyboard = { | ||
163 | .name = "keyboard", | ||
164 | .modes = pmx_keyboard_modes, | ||
165 | .mode_count = ARRAY_SIZE(pmx_keyboard_modes), | ||
166 | .enb_on_reset = 1, | ||
167 | }; | ||
168 | |||
169 | struct pmx_dev_mode pmx_clcd_modes[] = { | ||
170 | { | ||
171 | .ids = PHOTO_FRAME_MODE, | ||
172 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK , | ||
173 | }, { | ||
174 | .ids = HEND_IP_PHONE_MODE | HEND_WIFI_PHONE_MODE | | ||
175 | CAMU_LCD_MODE | CAML_LCD_MODE, | ||
176 | .mask = PMX_TIMER_3_4_MASK, | ||
177 | }, | ||
178 | }; | ||
179 | |||
180 | struct pmx_dev pmx_clcd = { | ||
181 | .name = "clcd", | ||
182 | .modes = pmx_clcd_modes, | ||
183 | .mode_count = ARRAY_SIZE(pmx_clcd_modes), | ||
184 | .enb_on_reset = 1, | ||
185 | }; | ||
186 | |||
187 | struct pmx_dev_mode pmx_telecom_gpio_modes[] = { | ||
188 | { | ||
189 | .ids = PHOTO_FRAME_MODE | CAMU_LCD_MODE | CAML_LCD_MODE, | ||
190 | .mask = PMX_MII_MASK, | ||
191 | }, { | ||
192 | .ids = LEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE, | ||
193 | .mask = PMX_MII_MASK | PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK, | ||
194 | }, { | ||
195 | .ids = ATA_PABX_I2S_MODE | CAML_LCDW_MODE | CAMU_WLCD_MODE, | ||
196 | .mask = PMX_MII_MASK | PMX_TIMER_3_4_MASK, | ||
197 | }, { | ||
198 | .ids = HEND_IP_PHONE_MODE | HEND_WIFI_PHONE_MODE, | ||
199 | .mask = PMX_MII_MASK | PMX_TIMER_1_2_MASK, | ||
200 | }, { | ||
201 | .ids = ATA_PABX_WI2S_MODE, | ||
202 | .mask = PMX_MII_MASK | PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK | ||
203 | | PMX_UART0_MODEM_MASK, | ||
204 | }, | ||
205 | }; | ||
206 | |||
207 | struct pmx_dev pmx_telecom_gpio = { | ||
208 | .name = "telecom_gpio", | ||
209 | .modes = pmx_telecom_gpio_modes, | ||
210 | .mode_count = ARRAY_SIZE(pmx_telecom_gpio_modes), | ||
211 | .enb_on_reset = 1, | ||
212 | }; | ||
213 | |||
214 | struct pmx_dev_mode pmx_telecom_tdm_modes[] = { | ||
215 | { | ||
216 | .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE | | ||
217 | HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE | ||
218 | | HEND_WIFI_PHONE_MODE | ATA_PABX_WI2S_MODE | ||
219 | | ATA_PABX_I2S_MODE | CAML_LCDW_MODE | CAMU_LCD_MODE | ||
220 | | CAMU_WLCD_MODE | CAML_LCD_MODE, | ||
221 | .mask = PMX_UART0_MODEM_MASK | PMX_SSP_CS_MASK, | ||
222 | }, | ||
223 | }; | ||
224 | |||
225 | struct pmx_dev pmx_telecom_tdm = { | ||
226 | .name = "telecom_tdm", | ||
227 | .modes = pmx_telecom_tdm_modes, | ||
228 | .mode_count = ARRAY_SIZE(pmx_telecom_tdm_modes), | ||
229 | .enb_on_reset = 1, | ||
230 | }; | ||
231 | |||
232 | struct pmx_dev_mode pmx_telecom_spi_cs_i2c_clk_modes[] = { | ||
233 | { | ||
234 | .ids = LEND_IP_PHONE_MODE | HEND_IP_PHONE_MODE | | ||
235 | LEND_WIFI_PHONE_MODE | HEND_WIFI_PHONE_MODE | ||
236 | | ATA_PABX_WI2S_MODE | ATA_PABX_I2S_MODE | | ||
237 | CAML_LCDW_MODE | CAML_LCD_MODE, | ||
238 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK, | ||
239 | }, | ||
240 | }; | ||
241 | |||
242 | struct pmx_dev pmx_telecom_spi_cs_i2c_clk = { | ||
243 | .name = "telecom_spi_cs_i2c_clk", | ||
244 | .modes = pmx_telecom_spi_cs_i2c_clk_modes, | ||
245 | .mode_count = ARRAY_SIZE(pmx_telecom_spi_cs_i2c_clk_modes), | ||
246 | .enb_on_reset = 1, | ||
247 | }; | ||
248 | |||
249 | struct pmx_dev_mode pmx_telecom_camera_modes[] = { | ||
250 | { | ||
251 | .ids = CAML_LCDW_MODE | CAML_LCD_MODE, | ||
252 | .mask = PMX_MII_MASK, | ||
253 | }, { | ||
254 | .ids = CAMU_LCD_MODE | CAMU_WLCD_MODE, | ||
255 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK | PMX_MII_MASK, | ||
256 | }, | ||
257 | }; | ||
258 | |||
259 | struct pmx_dev pmx_telecom_camera = { | ||
260 | .name = "telecom_camera", | ||
261 | .modes = pmx_telecom_camera_modes, | ||
262 | .mode_count = ARRAY_SIZE(pmx_telecom_camera_modes), | ||
263 | .enb_on_reset = 1, | ||
264 | }; | ||
265 | |||
266 | struct pmx_dev_mode pmx_telecom_dac_modes[] = { | ||
267 | { | ||
268 | .ids = ATA_PABX_I2S_MODE | CAML_LCDW_MODE | CAMU_LCD_MODE | ||
269 | | CAMU_WLCD_MODE | CAML_LCD_MODE, | ||
270 | .mask = PMX_TIMER_1_2_MASK, | ||
271 | }, | ||
272 | }; | ||
273 | |||
274 | struct pmx_dev pmx_telecom_dac = { | ||
275 | .name = "telecom_dac", | ||
276 | .modes = pmx_telecom_dac_modes, | ||
277 | .mode_count = ARRAY_SIZE(pmx_telecom_dac_modes), | ||
278 | .enb_on_reset = 1, | ||
279 | }; | ||
280 | |||
281 | struct pmx_dev_mode pmx_telecom_i2s_modes[] = { | ||
282 | { | ||
283 | .ids = LEND_IP_PHONE_MODE | HEND_IP_PHONE_MODE | ||
284 | | LEND_WIFI_PHONE_MODE | HEND_WIFI_PHONE_MODE | | ||
285 | ATA_PABX_I2S_MODE | CAML_LCDW_MODE | CAMU_LCD_MODE | ||
286 | | CAMU_WLCD_MODE | CAML_LCD_MODE, | ||
287 | .mask = PMX_UART0_MODEM_MASK, | ||
288 | }, | ||
289 | }; | ||
290 | |||
291 | struct pmx_dev pmx_telecom_i2s = { | ||
292 | .name = "telecom_i2s", | ||
293 | .modes = pmx_telecom_i2s_modes, | ||
294 | .mode_count = ARRAY_SIZE(pmx_telecom_i2s_modes), | ||
295 | .enb_on_reset = 1, | ||
296 | }; | ||
297 | |||
298 | struct pmx_dev_mode pmx_telecom_boot_pins_modes[] = { | ||
299 | { | ||
300 | .ids = NAND_MODE | NOR_MODE, | ||
301 | .mask = PMX_UART0_MODEM_MASK | PMX_TIMER_1_2_MASK | | ||
302 | PMX_TIMER_3_4_MASK, | ||
303 | }, | ||
304 | }; | ||
305 | |||
306 | struct pmx_dev pmx_telecom_boot_pins = { | ||
307 | .name = "telecom_boot_pins", | ||
308 | .modes = pmx_telecom_boot_pins_modes, | ||
309 | .mode_count = ARRAY_SIZE(pmx_telecom_boot_pins_modes), | ||
310 | .enb_on_reset = 1, | ||
311 | }; | ||
312 | |||
313 | struct pmx_dev_mode pmx_telecom_sdio_4bit_modes[] = { | ||
314 | { | ||
315 | .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE | | ||
316 | HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE | | ||
317 | HEND_WIFI_PHONE_MODE | CAML_LCDW_MODE | CAMU_LCD_MODE | | ||
318 | CAMU_WLCD_MODE | CAML_LCD_MODE | ATA_PABX_WI2S_MODE | | ||
319 | ATA_PABX_I2S_MODE, | ||
320 | .mask = PMX_GPIO_PIN0_MASK | PMX_GPIO_PIN1_MASK | | ||
321 | PMX_GPIO_PIN2_MASK | PMX_GPIO_PIN3_MASK | | ||
322 | PMX_GPIO_PIN4_MASK | PMX_GPIO_PIN5_MASK, | ||
323 | }, | ||
324 | }; | ||
325 | |||
326 | struct pmx_dev pmx_telecom_sdio_4bit = { | ||
327 | .name = "telecom_sdio_4bit", | ||
328 | .modes = pmx_telecom_sdio_4bit_modes, | ||
329 | .mode_count = ARRAY_SIZE(pmx_telecom_sdio_4bit_modes), | ||
330 | .enb_on_reset = 1, | ||
331 | }; | ||
332 | |||
333 | struct pmx_dev_mode pmx_telecom_sdio_8bit_modes[] = { | ||
334 | { | ||
335 | .ids = PHOTO_FRAME_MODE | LEND_IP_PHONE_MODE | | ||
336 | HEND_IP_PHONE_MODE | LEND_WIFI_PHONE_MODE | | ||
337 | HEND_WIFI_PHONE_MODE | CAML_LCDW_MODE | CAMU_LCD_MODE | | ||
338 | CAMU_WLCD_MODE | CAML_LCD_MODE, | ||
339 | .mask = PMX_GPIO_PIN0_MASK | PMX_GPIO_PIN1_MASK | | ||
340 | PMX_GPIO_PIN2_MASK | PMX_GPIO_PIN3_MASK | | ||
341 | PMX_GPIO_PIN4_MASK | PMX_GPIO_PIN5_MASK | PMX_MII_MASK, | ||
342 | }, | ||
343 | }; | ||
344 | |||
345 | struct pmx_dev pmx_telecom_sdio_8bit = { | ||
346 | .name = "telecom_sdio_8bit", | ||
347 | .modes = pmx_telecom_sdio_8bit_modes, | ||
348 | .mode_count = ARRAY_SIZE(pmx_telecom_sdio_8bit_modes), | ||
349 | .enb_on_reset = 1, | ||
350 | }; | ||
351 | |||
352 | struct pmx_dev_mode pmx_gpio1_modes[] = { | ||
353 | { | ||
354 | .ids = PHOTO_FRAME_MODE, | ||
355 | .mask = PMX_UART0_MODEM_MASK | PMX_TIMER_1_2_MASK | | ||
356 | PMX_TIMER_3_4_MASK, | ||
357 | }, | ||
358 | }; | ||
359 | |||
360 | struct pmx_dev pmx_gpio1 = { | ||
361 | .name = "arm gpio1", | ||
362 | .modes = pmx_gpio1_modes, | ||
363 | .mode_count = ARRAY_SIZE(pmx_gpio1_modes), | ||
364 | .enb_on_reset = 1, | ||
365 | }; | ||
366 | |||
367 | /* pmx driver structure */ | ||
368 | struct pmx_driver pmx_driver = { | ||
369 | .mode_reg = {.offset = MODE_CONFIG_REG, .mask = 0x0000000f}, | ||
370 | .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff}, | ||
371 | }; | ||
372 | |||
373 | /* Add spear300 specific devices here */ | ||
374 | /* arm gpio1 device registeration */ | ||
375 | static struct pl061_platform_data gpio1_plat_data = { | ||
376 | .gpio_base = 8, | ||
377 | .irq_base = SPEAR_GPIO1_INT_BASE, | ||
378 | }; | ||
379 | |||
380 | struct amba_device gpio1_device = { | ||
381 | .dev = { | ||
382 | .init_name = "gpio1", | ||
383 | .platform_data = &gpio1_plat_data, | ||
384 | }, | ||
385 | .res = { | ||
386 | .start = SPEAR300_GPIO_BASE, | ||
387 | .end = SPEAR300_GPIO_BASE + SPEAR300_GPIO_SIZE - 1, | ||
388 | .flags = IORESOURCE_MEM, | ||
389 | }, | ||
390 | .irq = {VIRQ_GPIO1, NO_IRQ}, | ||
391 | }; | ||
392 | |||
393 | /* spear3xx shared irq */ | ||
394 | struct shirq_dev_config shirq_ras1_config[] = { | ||
395 | { | ||
396 | .virq = VIRQ_IT_PERS_S, | ||
397 | .enb_mask = IT_PERS_S_IRQ_MASK, | ||
398 | .status_mask = IT_PERS_S_IRQ_MASK, | ||
399 | }, { | ||
400 | .virq = VIRQ_IT_CHANGE_S, | ||
401 | .enb_mask = IT_CHANGE_S_IRQ_MASK, | ||
402 | .status_mask = IT_CHANGE_S_IRQ_MASK, | ||
403 | }, { | ||
404 | .virq = VIRQ_I2S, | ||
405 | .enb_mask = I2S_IRQ_MASK, | ||
406 | .status_mask = I2S_IRQ_MASK, | ||
407 | }, { | ||
408 | .virq = VIRQ_TDM, | ||
409 | .enb_mask = TDM_IRQ_MASK, | ||
410 | .status_mask = TDM_IRQ_MASK, | ||
411 | }, { | ||
412 | .virq = VIRQ_CAMERA_L, | ||
413 | .enb_mask = CAMERA_L_IRQ_MASK, | ||
414 | .status_mask = CAMERA_L_IRQ_MASK, | ||
415 | }, { | ||
416 | .virq = VIRQ_CAMERA_F, | ||
417 | .enb_mask = CAMERA_F_IRQ_MASK, | ||
418 | .status_mask = CAMERA_F_IRQ_MASK, | ||
419 | }, { | ||
420 | .virq = VIRQ_CAMERA_V, | ||
421 | .enb_mask = CAMERA_V_IRQ_MASK, | ||
422 | .status_mask = CAMERA_V_IRQ_MASK, | ||
423 | }, { | ||
424 | .virq = VIRQ_KEYBOARD, | ||
425 | .enb_mask = KEYBOARD_IRQ_MASK, | ||
426 | .status_mask = KEYBOARD_IRQ_MASK, | ||
427 | }, { | ||
428 | .virq = VIRQ_GPIO1, | ||
429 | .enb_mask = GPIO1_IRQ_MASK, | ||
430 | .status_mask = GPIO1_IRQ_MASK, | ||
431 | }, | ||
432 | }; | ||
433 | |||
434 | struct spear_shirq shirq_ras1 = { | ||
435 | .irq = IRQ_GEN_RAS_1, | ||
436 | .dev_config = shirq_ras1_config, | ||
437 | .dev_count = ARRAY_SIZE(shirq_ras1_config), | ||
438 | .regs = { | ||
439 | .enb_reg = INT_ENB_MASK_REG, | ||
440 | .status_reg = INT_STS_MASK_REG, | ||
441 | .status_reg_mask = SHIRQ_RAS1_MASK, | ||
442 | .clear_reg = -1, | ||
443 | }, | ||
444 | }; | ||
445 | |||
446 | /* spear300 routines */ | ||
447 | void __init spear300_init(void) | ||
448 | { | ||
449 | int ret = 0; | ||
450 | |||
451 | /* call spear3xx family common init function */ | ||
452 | spear3xx_init(); | ||
453 | |||
454 | /* shared irq registeration */ | ||
455 | shirq_ras1.regs.base = | ||
456 | ioremap(SPEAR300_TELECOM_BASE, SPEAR300_TELECOM_REG_SIZE); | ||
457 | if (shirq_ras1.regs.base) { | ||
458 | ret = spear_shirq_register(&shirq_ras1); | ||
459 | if (ret) | ||
460 | printk(KERN_ERR "Error registering Shared IRQ\n"); | ||
461 | } | ||
462 | } | ||
463 | |||
464 | void spear300_pmx_init(void) | ||
465 | { | ||
466 | spear_pmx_init(&pmx_driver, SPEAR300_SOC_CONFIG_BASE, | ||
467 | SPEAR300_SOC_CONFIG_SIZE); | ||
468 | } | ||
diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c new file mode 100644 index 000000000000..bb21db152a23 --- /dev/null +++ b/arch/arm/mach-spear3xx/spear300_evb.c | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/spear300_evb.c | ||
3 | * | ||
4 | * SPEAr300 evaluation board source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <asm/mach/arch.h> | ||
15 | #include <asm/mach-types.h> | ||
16 | #include <mach/generic.h> | ||
17 | #include <mach/spear.h> | ||
18 | |||
19 | /* padmux devices to enable */ | ||
20 | static struct pmx_dev *pmx_devs[] = { | ||
21 | /* spear3xx specific devices */ | ||
22 | &pmx_i2c, | ||
23 | &pmx_ssp_cs, | ||
24 | &pmx_ssp, | ||
25 | &pmx_mii, | ||
26 | &pmx_uart0, | ||
27 | |||
28 | /* spear300 specific devices */ | ||
29 | &pmx_fsmc_2_chips, | ||
30 | &pmx_clcd, | ||
31 | &pmx_telecom_sdio_4bit, | ||
32 | &pmx_gpio1, | ||
33 | }; | ||
34 | |||
35 | static struct amba_device *amba_devs[] __initdata = { | ||
36 | /* spear3xx specific devices */ | ||
37 | &gpio_device, | ||
38 | &uart_device, | ||
39 | |||
40 | /* spear300 specific devices */ | ||
41 | &gpio1_device, | ||
42 | }; | ||
43 | |||
44 | static struct platform_device *plat_devs[] __initdata = { | ||
45 | /* spear3xx specific devices */ | ||
46 | |||
47 | /* spear300 specific devices */ | ||
48 | }; | ||
49 | |||
50 | static void __init spear300_evb_init(void) | ||
51 | { | ||
52 | unsigned int i; | ||
53 | |||
54 | /* call spear300 machine init function */ | ||
55 | spear300_init(); | ||
56 | |||
57 | /* padmux initialization */ | ||
58 | pmx_driver.mode = &photo_frame_mode; | ||
59 | pmx_driver.devs = pmx_devs; | ||
60 | pmx_driver.devs_count = ARRAY_SIZE(pmx_devs); | ||
61 | spear300_pmx_init(); | ||
62 | |||
63 | /* Add Platform Devices */ | ||
64 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); | ||
65 | |||
66 | /* Add Amba Devices */ | ||
67 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) | ||
68 | amba_device_register(amba_devs[i], &iomem_resource); | ||
69 | } | ||
70 | |||
71 | MACHINE_START(SPEAR300, "ST-SPEAR300-EVB") | ||
72 | .boot_params = 0x00000100, | ||
73 | .map_io = spear3xx_map_io, | ||
74 | .init_irq = spear3xx_init_irq, | ||
75 | .timer = &spear_sys_timer, | ||
76 | .init_machine = spear300_evb_init, | ||
77 | MACHINE_END | ||
diff --git a/arch/arm/mach-spear3xx/spear310.c b/arch/arm/mach-spear3xx/spear310.c new file mode 100644 index 000000000000..96a1ab824bac --- /dev/null +++ b/arch/arm/mach-spear3xx/spear310.c | |||
@@ -0,0 +1,302 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/spear310.c | ||
3 | * | ||
4 | * SPEAr310 machine source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/ptrace.h> | ||
15 | #include <asm/irq.h> | ||
16 | #include <mach/generic.h> | ||
17 | #include <mach/spear.h> | ||
18 | #include <plat/shirq.h> | ||
19 | |||
20 | /* pad multiplexing support */ | ||
21 | /* muxing registers */ | ||
22 | #define PAD_MUX_CONFIG_REG 0x08 | ||
23 | |||
24 | /* devices */ | ||
25 | struct pmx_dev_mode pmx_emi_cs_0_1_4_5_modes[] = { | ||
26 | { | ||
27 | .ids = 0x00, | ||
28 | .mask = PMX_TIMER_3_4_MASK, | ||
29 | }, | ||
30 | }; | ||
31 | |||
32 | struct pmx_dev pmx_emi_cs_0_1_4_5 = { | ||
33 | .name = "emi_cs_0_1_4_5", | ||
34 | .modes = pmx_emi_cs_0_1_4_5_modes, | ||
35 | .mode_count = ARRAY_SIZE(pmx_emi_cs_0_1_4_5_modes), | ||
36 | .enb_on_reset = 1, | ||
37 | }; | ||
38 | |||
39 | struct pmx_dev_mode pmx_emi_cs_2_3_modes[] = { | ||
40 | { | ||
41 | .ids = 0x00, | ||
42 | .mask = PMX_TIMER_1_2_MASK, | ||
43 | }, | ||
44 | }; | ||
45 | |||
46 | struct pmx_dev pmx_emi_cs_2_3 = { | ||
47 | .name = "emi_cs_2_3", | ||
48 | .modes = pmx_emi_cs_2_3_modes, | ||
49 | .mode_count = ARRAY_SIZE(pmx_emi_cs_2_3_modes), | ||
50 | .enb_on_reset = 1, | ||
51 | }; | ||
52 | |||
53 | struct pmx_dev_mode pmx_uart1_modes[] = { | ||
54 | { | ||
55 | .ids = 0x00, | ||
56 | .mask = PMX_FIRDA_MASK, | ||
57 | }, | ||
58 | }; | ||
59 | |||
60 | struct pmx_dev pmx_uart1 = { | ||
61 | .name = "uart1", | ||
62 | .modes = pmx_uart1_modes, | ||
63 | .mode_count = ARRAY_SIZE(pmx_uart1_modes), | ||
64 | .enb_on_reset = 1, | ||
65 | }; | ||
66 | |||
67 | struct pmx_dev_mode pmx_uart2_modes[] = { | ||
68 | { | ||
69 | .ids = 0x00, | ||
70 | .mask = PMX_TIMER_1_2_MASK, | ||
71 | }, | ||
72 | }; | ||
73 | |||
74 | struct pmx_dev pmx_uart2 = { | ||
75 | .name = "uart2", | ||
76 | .modes = pmx_uart2_modes, | ||
77 | .mode_count = ARRAY_SIZE(pmx_uart2_modes), | ||
78 | .enb_on_reset = 1, | ||
79 | }; | ||
80 | |||
81 | struct pmx_dev_mode pmx_uart3_4_5_modes[] = { | ||
82 | { | ||
83 | .ids = 0x00, | ||
84 | .mask = PMX_UART0_MODEM_MASK, | ||
85 | }, | ||
86 | }; | ||
87 | |||
88 | struct pmx_dev pmx_uart3_4_5 = { | ||
89 | .name = "uart3_4_5", | ||
90 | .modes = pmx_uart3_4_5_modes, | ||
91 | .mode_count = ARRAY_SIZE(pmx_uart3_4_5_modes), | ||
92 | .enb_on_reset = 1, | ||
93 | }; | ||
94 | |||
95 | struct pmx_dev_mode pmx_fsmc_modes[] = { | ||
96 | { | ||
97 | .ids = 0x00, | ||
98 | .mask = PMX_SSP_CS_MASK, | ||
99 | }, | ||
100 | }; | ||
101 | |||
102 | struct pmx_dev pmx_fsmc = { | ||
103 | .name = "fsmc", | ||
104 | .modes = pmx_fsmc_modes, | ||
105 | .mode_count = ARRAY_SIZE(pmx_fsmc_modes), | ||
106 | .enb_on_reset = 1, | ||
107 | }; | ||
108 | |||
109 | struct pmx_dev_mode pmx_rs485_0_1_modes[] = { | ||
110 | { | ||
111 | .ids = 0x00, | ||
112 | .mask = PMX_MII_MASK, | ||
113 | }, | ||
114 | }; | ||
115 | |||
116 | struct pmx_dev pmx_rs485_0_1 = { | ||
117 | .name = "rs485_0_1", | ||
118 | .modes = pmx_rs485_0_1_modes, | ||
119 | .mode_count = ARRAY_SIZE(pmx_rs485_0_1_modes), | ||
120 | .enb_on_reset = 1, | ||
121 | }; | ||
122 | |||
123 | struct pmx_dev_mode pmx_tdm0_modes[] = { | ||
124 | { | ||
125 | .ids = 0x00, | ||
126 | .mask = PMX_MII_MASK, | ||
127 | }, | ||
128 | }; | ||
129 | |||
130 | struct pmx_dev pmx_tdm0 = { | ||
131 | .name = "tdm0", | ||
132 | .modes = pmx_tdm0_modes, | ||
133 | .mode_count = ARRAY_SIZE(pmx_tdm0_modes), | ||
134 | .enb_on_reset = 1, | ||
135 | }; | ||
136 | |||
137 | /* pmx driver structure */ | ||
138 | struct pmx_driver pmx_driver = { | ||
139 | .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff}, | ||
140 | }; | ||
141 | |||
142 | /* Add spear310 specific devices here */ | ||
143 | |||
144 | /* spear3xx shared irq */ | ||
145 | struct shirq_dev_config shirq_ras1_config[] = { | ||
146 | { | ||
147 | .virq = VIRQ_SMII0, | ||
148 | .status_mask = SMII0_IRQ_MASK, | ||
149 | }, { | ||
150 | .virq = VIRQ_SMII1, | ||
151 | .status_mask = SMII1_IRQ_MASK, | ||
152 | }, { | ||
153 | .virq = VIRQ_SMII2, | ||
154 | .status_mask = SMII2_IRQ_MASK, | ||
155 | }, { | ||
156 | .virq = VIRQ_SMII3, | ||
157 | .status_mask = SMII3_IRQ_MASK, | ||
158 | }, { | ||
159 | .virq = VIRQ_WAKEUP_SMII0, | ||
160 | .status_mask = WAKEUP_SMII0_IRQ_MASK, | ||
161 | }, { | ||
162 | .virq = VIRQ_WAKEUP_SMII1, | ||
163 | .status_mask = WAKEUP_SMII1_IRQ_MASK, | ||
164 | }, { | ||
165 | .virq = VIRQ_WAKEUP_SMII2, | ||
166 | .status_mask = WAKEUP_SMII2_IRQ_MASK, | ||
167 | }, { | ||
168 | .virq = VIRQ_WAKEUP_SMII3, | ||
169 | .status_mask = WAKEUP_SMII3_IRQ_MASK, | ||
170 | }, | ||
171 | }; | ||
172 | |||
173 | struct spear_shirq shirq_ras1 = { | ||
174 | .irq = IRQ_GEN_RAS_1, | ||
175 | .dev_config = shirq_ras1_config, | ||
176 | .dev_count = ARRAY_SIZE(shirq_ras1_config), | ||
177 | .regs = { | ||
178 | .enb_reg = -1, | ||
179 | .status_reg = INT_STS_MASK_REG, | ||
180 | .status_reg_mask = SHIRQ_RAS1_MASK, | ||
181 | .clear_reg = -1, | ||
182 | }, | ||
183 | }; | ||
184 | |||
185 | struct shirq_dev_config shirq_ras2_config[] = { | ||
186 | { | ||
187 | .virq = VIRQ_UART1, | ||
188 | .status_mask = UART1_IRQ_MASK, | ||
189 | }, { | ||
190 | .virq = VIRQ_UART2, | ||
191 | .status_mask = UART2_IRQ_MASK, | ||
192 | }, { | ||
193 | .virq = VIRQ_UART3, | ||
194 | .status_mask = UART3_IRQ_MASK, | ||
195 | }, { | ||
196 | .virq = VIRQ_UART4, | ||
197 | .status_mask = UART4_IRQ_MASK, | ||
198 | }, { | ||
199 | .virq = VIRQ_UART5, | ||
200 | .status_mask = UART5_IRQ_MASK, | ||
201 | }, | ||
202 | }; | ||
203 | |||
204 | struct spear_shirq shirq_ras2 = { | ||
205 | .irq = IRQ_GEN_RAS_2, | ||
206 | .dev_config = shirq_ras2_config, | ||
207 | .dev_count = ARRAY_SIZE(shirq_ras2_config), | ||
208 | .regs = { | ||
209 | .enb_reg = -1, | ||
210 | .status_reg = INT_STS_MASK_REG, | ||
211 | .status_reg_mask = SHIRQ_RAS2_MASK, | ||
212 | .clear_reg = -1, | ||
213 | }, | ||
214 | }; | ||
215 | |||
216 | struct shirq_dev_config shirq_ras3_config[] = { | ||
217 | { | ||
218 | .virq = VIRQ_EMI, | ||
219 | .status_mask = EMI_IRQ_MASK, | ||
220 | }, | ||
221 | }; | ||
222 | |||
223 | struct spear_shirq shirq_ras3 = { | ||
224 | .irq = IRQ_GEN_RAS_3, | ||
225 | .dev_config = shirq_ras3_config, | ||
226 | .dev_count = ARRAY_SIZE(shirq_ras3_config), | ||
227 | .regs = { | ||
228 | .enb_reg = -1, | ||
229 | .status_reg = INT_STS_MASK_REG, | ||
230 | .status_reg_mask = SHIRQ_RAS3_MASK, | ||
231 | .clear_reg = -1, | ||
232 | }, | ||
233 | }; | ||
234 | |||
235 | struct shirq_dev_config shirq_intrcomm_ras_config[] = { | ||
236 | { | ||
237 | .virq = VIRQ_TDM_HDLC, | ||
238 | .status_mask = TDM_HDLC_IRQ_MASK, | ||
239 | }, { | ||
240 | .virq = VIRQ_RS485_0, | ||
241 | .status_mask = RS485_0_IRQ_MASK, | ||
242 | }, { | ||
243 | .virq = VIRQ_RS485_1, | ||
244 | .status_mask = RS485_1_IRQ_MASK, | ||
245 | }, | ||
246 | }; | ||
247 | |||
248 | struct spear_shirq shirq_intrcomm_ras = { | ||
249 | .irq = IRQ_INTRCOMM_RAS_ARM, | ||
250 | .dev_config = shirq_intrcomm_ras_config, | ||
251 | .dev_count = ARRAY_SIZE(shirq_intrcomm_ras_config), | ||
252 | .regs = { | ||
253 | .enb_reg = -1, | ||
254 | .status_reg = INT_STS_MASK_REG, | ||
255 | .status_reg_mask = SHIRQ_INTRCOMM_RAS_MASK, | ||
256 | .clear_reg = -1, | ||
257 | }, | ||
258 | }; | ||
259 | |||
260 | /* spear310 routines */ | ||
261 | void __init spear310_init(void) | ||
262 | { | ||
263 | void __iomem *base; | ||
264 | int ret = 0; | ||
265 | |||
266 | /* call spear3xx family common init function */ | ||
267 | spear3xx_init(); | ||
268 | |||
269 | /* shared irq registeration */ | ||
270 | base = ioremap(SPEAR310_SOC_CONFIG_BASE, SPEAR310_SOC_CONFIG_SIZE); | ||
271 | if (base) { | ||
272 | /* shirq 1 */ | ||
273 | shirq_ras1.regs.base = base; | ||
274 | ret = spear_shirq_register(&shirq_ras1); | ||
275 | if (ret) | ||
276 | printk(KERN_ERR "Error registering Shared IRQ 1\n"); | ||
277 | |||
278 | /* shirq 2 */ | ||
279 | shirq_ras2.regs.base = base; | ||
280 | ret = spear_shirq_register(&shirq_ras2); | ||
281 | if (ret) | ||
282 | printk(KERN_ERR "Error registering Shared IRQ 2\n"); | ||
283 | |||
284 | /* shirq 3 */ | ||
285 | shirq_ras3.regs.base = base; | ||
286 | ret = spear_shirq_register(&shirq_ras3); | ||
287 | if (ret) | ||
288 | printk(KERN_ERR "Error registering Shared IRQ 3\n"); | ||
289 | |||
290 | /* shirq 4 */ | ||
291 | shirq_intrcomm_ras.regs.base = base; | ||
292 | ret = spear_shirq_register(&shirq_intrcomm_ras); | ||
293 | if (ret) | ||
294 | printk(KERN_ERR "Error registering Shared IRQ 4\n"); | ||
295 | } | ||
296 | } | ||
297 | |||
298 | void spear310_pmx_init(void) | ||
299 | { | ||
300 | spear_pmx_init(&pmx_driver, SPEAR310_SOC_CONFIG_BASE, | ||
301 | SPEAR310_SOC_CONFIG_SIZE); | ||
302 | } | ||
diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c new file mode 100644 index 000000000000..7facf6643199 --- /dev/null +++ b/arch/arm/mach-spear3xx/spear310_evb.c | |||
@@ -0,0 +1,84 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/spear310_evb.c | ||
3 | * | ||
4 | * SPEAr310 evaluation board source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <asm/mach/arch.h> | ||
15 | #include <asm/mach-types.h> | ||
16 | #include <mach/generic.h> | ||
17 | #include <mach/spear.h> | ||
18 | |||
19 | /* padmux devices to enable */ | ||
20 | static struct pmx_dev *pmx_devs[] = { | ||
21 | /* spear3xx specific devices */ | ||
22 | &pmx_i2c, | ||
23 | &pmx_ssp, | ||
24 | &pmx_gpio_pin0, | ||
25 | &pmx_gpio_pin1, | ||
26 | &pmx_gpio_pin2, | ||
27 | &pmx_gpio_pin3, | ||
28 | &pmx_gpio_pin4, | ||
29 | &pmx_gpio_pin5, | ||
30 | &pmx_uart0, | ||
31 | |||
32 | /* spear310 specific devices */ | ||
33 | &pmx_emi_cs_0_1_4_5, | ||
34 | &pmx_emi_cs_2_3, | ||
35 | &pmx_uart1, | ||
36 | &pmx_uart2, | ||
37 | &pmx_uart3_4_5, | ||
38 | &pmx_fsmc, | ||
39 | &pmx_rs485_0_1, | ||
40 | &pmx_tdm0, | ||
41 | }; | ||
42 | |||
43 | static struct amba_device *amba_devs[] __initdata = { | ||
44 | /* spear3xx specific devices */ | ||
45 | &gpio_device, | ||
46 | &uart_device, | ||
47 | |||
48 | /* spear310 specific devices */ | ||
49 | }; | ||
50 | |||
51 | static struct platform_device *plat_devs[] __initdata = { | ||
52 | /* spear3xx specific devices */ | ||
53 | |||
54 | /* spear310 specific devices */ | ||
55 | }; | ||
56 | |||
57 | static void __init spear310_evb_init(void) | ||
58 | { | ||
59 | unsigned int i; | ||
60 | |||
61 | /* call spear310 machine init function */ | ||
62 | spear310_init(); | ||
63 | |||
64 | /* padmux initialization */ | ||
65 | pmx_driver.mode = NULL; | ||
66 | pmx_driver.devs = pmx_devs; | ||
67 | pmx_driver.devs_count = ARRAY_SIZE(pmx_devs); | ||
68 | spear310_pmx_init(); | ||
69 | |||
70 | /* Add Platform Devices */ | ||
71 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); | ||
72 | |||
73 | /* Add Amba Devices */ | ||
74 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) | ||
75 | amba_device_register(amba_devs[i], &iomem_resource); | ||
76 | } | ||
77 | |||
78 | MACHINE_START(SPEAR310, "ST-SPEAR310-EVB") | ||
79 | .boot_params = 0x00000100, | ||
80 | .map_io = spear3xx_map_io, | ||
81 | .init_irq = spear3xx_init_irq, | ||
82 | .timer = &spear_sys_timer, | ||
83 | .init_machine = spear310_evb_init, | ||
84 | MACHINE_END | ||
diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c new file mode 100644 index 000000000000..6a1219549369 --- /dev/null +++ b/arch/arm/mach-spear3xx/spear320.c | |||
@@ -0,0 +1,549 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/spear320.c | ||
3 | * | ||
4 | * SPEAr320 machine source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/ptrace.h> | ||
15 | #include <asm/irq.h> | ||
16 | #include <mach/generic.h> | ||
17 | #include <mach/spear.h> | ||
18 | #include <plat/shirq.h> | ||
19 | |||
20 | /* pad multiplexing support */ | ||
21 | /* muxing registers */ | ||
22 | #define PAD_MUX_CONFIG_REG 0x0C | ||
23 | #define MODE_CONFIG_REG 0x10 | ||
24 | |||
25 | /* modes */ | ||
26 | #define AUTO_NET_SMII_MODE (1 << 0) | ||
27 | #define AUTO_NET_MII_MODE (1 << 1) | ||
28 | #define AUTO_EXP_MODE (1 << 2) | ||
29 | #define SMALL_PRINTERS_MODE (1 << 3) | ||
30 | #define ALL_MODES 0xF | ||
31 | |||
32 | struct pmx_mode auto_net_smii_mode = { | ||
33 | .id = AUTO_NET_SMII_MODE, | ||
34 | .name = "Automation Networking SMII Mode", | ||
35 | .mask = 0x00, | ||
36 | }; | ||
37 | |||
38 | struct pmx_mode auto_net_mii_mode = { | ||
39 | .id = AUTO_NET_MII_MODE, | ||
40 | .name = "Automation Networking MII Mode", | ||
41 | .mask = 0x01, | ||
42 | }; | ||
43 | |||
44 | struct pmx_mode auto_exp_mode = { | ||
45 | .id = AUTO_EXP_MODE, | ||
46 | .name = "Automation Expanded Mode", | ||
47 | .mask = 0x02, | ||
48 | }; | ||
49 | |||
50 | struct pmx_mode small_printers_mode = { | ||
51 | .id = SMALL_PRINTERS_MODE, | ||
52 | .name = "Small Printers Mode", | ||
53 | .mask = 0x03, | ||
54 | }; | ||
55 | |||
56 | /* devices */ | ||
57 | struct pmx_dev_mode pmx_clcd_modes[] = { | ||
58 | { | ||
59 | .ids = AUTO_NET_SMII_MODE, | ||
60 | .mask = 0x0, | ||
61 | }, | ||
62 | }; | ||
63 | |||
64 | struct pmx_dev pmx_clcd = { | ||
65 | .name = "clcd", | ||
66 | .modes = pmx_clcd_modes, | ||
67 | .mode_count = ARRAY_SIZE(pmx_clcd_modes), | ||
68 | .enb_on_reset = 1, | ||
69 | }; | ||
70 | |||
71 | struct pmx_dev_mode pmx_emi_modes[] = { | ||
72 | { | ||
73 | .ids = AUTO_EXP_MODE, | ||
74 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | struct pmx_dev pmx_emi = { | ||
79 | .name = "emi", | ||
80 | .modes = pmx_emi_modes, | ||
81 | .mode_count = ARRAY_SIZE(pmx_emi_modes), | ||
82 | .enb_on_reset = 1, | ||
83 | }; | ||
84 | |||
85 | struct pmx_dev_mode pmx_fsmc_modes[] = { | ||
86 | { | ||
87 | .ids = ALL_MODES, | ||
88 | .mask = 0x0, | ||
89 | }, | ||
90 | }; | ||
91 | |||
92 | struct pmx_dev pmx_fsmc = { | ||
93 | .name = "fsmc", | ||
94 | .modes = pmx_fsmc_modes, | ||
95 | .mode_count = ARRAY_SIZE(pmx_fsmc_modes), | ||
96 | .enb_on_reset = 1, | ||
97 | }; | ||
98 | |||
99 | struct pmx_dev_mode pmx_spp_modes[] = { | ||
100 | { | ||
101 | .ids = SMALL_PRINTERS_MODE, | ||
102 | .mask = 0x0, | ||
103 | }, | ||
104 | }; | ||
105 | |||
106 | struct pmx_dev pmx_spp = { | ||
107 | .name = "spp", | ||
108 | .modes = pmx_spp_modes, | ||
109 | .mode_count = ARRAY_SIZE(pmx_spp_modes), | ||
110 | .enb_on_reset = 1, | ||
111 | }; | ||
112 | |||
113 | struct pmx_dev_mode pmx_sdio_modes[] = { | ||
114 | { | ||
115 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE | | ||
116 | SMALL_PRINTERS_MODE, | ||
117 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK, | ||
118 | }, | ||
119 | }; | ||
120 | |||
121 | struct pmx_dev pmx_sdio = { | ||
122 | .name = "sdio", | ||
123 | .modes = pmx_sdio_modes, | ||
124 | .mode_count = ARRAY_SIZE(pmx_sdio_modes), | ||
125 | .enb_on_reset = 1, | ||
126 | }; | ||
127 | |||
128 | struct pmx_dev_mode pmx_i2s_modes[] = { | ||
129 | { | ||
130 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, | ||
131 | .mask = PMX_UART0_MODEM_MASK, | ||
132 | }, | ||
133 | }; | ||
134 | |||
135 | struct pmx_dev pmx_i2s = { | ||
136 | .name = "i2s", | ||
137 | .modes = pmx_i2s_modes, | ||
138 | .mode_count = ARRAY_SIZE(pmx_i2s_modes), | ||
139 | .enb_on_reset = 1, | ||
140 | }; | ||
141 | |||
142 | struct pmx_dev_mode pmx_uart1_modes[] = { | ||
143 | { | ||
144 | .ids = ALL_MODES, | ||
145 | .mask = PMX_GPIO_PIN0_MASK | PMX_GPIO_PIN1_MASK, | ||
146 | }, | ||
147 | }; | ||
148 | |||
149 | struct pmx_dev pmx_uart1 = { | ||
150 | .name = "uart1", | ||
151 | .modes = pmx_uart1_modes, | ||
152 | .mode_count = ARRAY_SIZE(pmx_uart1_modes), | ||
153 | .enb_on_reset = 1, | ||
154 | }; | ||
155 | |||
156 | struct pmx_dev_mode pmx_uart1_modem_modes[] = { | ||
157 | { | ||
158 | .ids = AUTO_EXP_MODE, | ||
159 | .mask = PMX_TIMER_1_2_MASK | PMX_TIMER_3_4_MASK | | ||
160 | PMX_SSP_CS_MASK, | ||
161 | }, { | ||
162 | .ids = SMALL_PRINTERS_MODE, | ||
163 | .mask = PMX_GPIO_PIN3_MASK | PMX_GPIO_PIN4_MASK | | ||
164 | PMX_GPIO_PIN5_MASK | PMX_SSP_CS_MASK, | ||
165 | }, | ||
166 | }; | ||
167 | |||
168 | struct pmx_dev pmx_uart1_modem = { | ||
169 | .name = "uart1_modem", | ||
170 | .modes = pmx_uart1_modem_modes, | ||
171 | .mode_count = ARRAY_SIZE(pmx_uart1_modem_modes), | ||
172 | .enb_on_reset = 1, | ||
173 | }; | ||
174 | |||
175 | struct pmx_dev_mode pmx_uart2_modes[] = { | ||
176 | { | ||
177 | .ids = ALL_MODES, | ||
178 | .mask = PMX_FIRDA_MASK, | ||
179 | }, | ||
180 | }; | ||
181 | |||
182 | struct pmx_dev pmx_uart2 = { | ||
183 | .name = "uart2", | ||
184 | .modes = pmx_uart2_modes, | ||
185 | .mode_count = ARRAY_SIZE(pmx_uart2_modes), | ||
186 | .enb_on_reset = 1, | ||
187 | }; | ||
188 | |||
189 | struct pmx_dev_mode pmx_touchscreen_modes[] = { | ||
190 | { | ||
191 | .ids = AUTO_NET_SMII_MODE, | ||
192 | .mask = PMX_SSP_CS_MASK, | ||
193 | }, | ||
194 | }; | ||
195 | |||
196 | struct pmx_dev pmx_touchscreen = { | ||
197 | .name = "touchscreen", | ||
198 | .modes = pmx_touchscreen_modes, | ||
199 | .mode_count = ARRAY_SIZE(pmx_touchscreen_modes), | ||
200 | .enb_on_reset = 1, | ||
201 | }; | ||
202 | |||
203 | struct pmx_dev_mode pmx_can_modes[] = { | ||
204 | { | ||
205 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE | AUTO_EXP_MODE, | ||
206 | .mask = PMX_GPIO_PIN2_MASK | PMX_GPIO_PIN3_MASK | | ||
207 | PMX_GPIO_PIN4_MASK | PMX_GPIO_PIN5_MASK, | ||
208 | }, | ||
209 | }; | ||
210 | |||
211 | struct pmx_dev pmx_can = { | ||
212 | .name = "can", | ||
213 | .modes = pmx_can_modes, | ||
214 | .mode_count = ARRAY_SIZE(pmx_can_modes), | ||
215 | .enb_on_reset = 1, | ||
216 | }; | ||
217 | |||
218 | struct pmx_dev_mode pmx_sdio_led_modes[] = { | ||
219 | { | ||
220 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, | ||
221 | .mask = PMX_SSP_CS_MASK, | ||
222 | }, | ||
223 | }; | ||
224 | |||
225 | struct pmx_dev pmx_sdio_led = { | ||
226 | .name = "sdio_led", | ||
227 | .modes = pmx_sdio_led_modes, | ||
228 | .mode_count = ARRAY_SIZE(pmx_sdio_led_modes), | ||
229 | .enb_on_reset = 1, | ||
230 | }; | ||
231 | |||
232 | struct pmx_dev_mode pmx_pwm0_modes[] = { | ||
233 | { | ||
234 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, | ||
235 | .mask = PMX_UART0_MODEM_MASK, | ||
236 | }, { | ||
237 | .ids = AUTO_EXP_MODE | SMALL_PRINTERS_MODE, | ||
238 | .mask = PMX_MII_MASK, | ||
239 | }, | ||
240 | }; | ||
241 | |||
242 | struct pmx_dev pmx_pwm0 = { | ||
243 | .name = "pwm0", | ||
244 | .modes = pmx_pwm0_modes, | ||
245 | .mode_count = ARRAY_SIZE(pmx_pwm0_modes), | ||
246 | .enb_on_reset = 1, | ||
247 | }; | ||
248 | |||
249 | struct pmx_dev_mode pmx_pwm1_modes[] = { | ||
250 | { | ||
251 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, | ||
252 | .mask = PMX_UART0_MODEM_MASK, | ||
253 | }, { | ||
254 | .ids = AUTO_EXP_MODE | SMALL_PRINTERS_MODE, | ||
255 | .mask = PMX_MII_MASK, | ||
256 | }, | ||
257 | }; | ||
258 | |||
259 | struct pmx_dev pmx_pwm1 = { | ||
260 | .name = "pwm1", | ||
261 | .modes = pmx_pwm1_modes, | ||
262 | .mode_count = ARRAY_SIZE(pmx_pwm1_modes), | ||
263 | .enb_on_reset = 1, | ||
264 | }; | ||
265 | |||
266 | struct pmx_dev_mode pmx_pwm2_modes[] = { | ||
267 | { | ||
268 | .ids = AUTO_NET_SMII_MODE | AUTO_NET_MII_MODE, | ||
269 | .mask = PMX_SSP_CS_MASK, | ||
270 | }, { | ||
271 | .ids = AUTO_EXP_MODE | SMALL_PRINTERS_MODE, | ||
272 | .mask = PMX_MII_MASK, | ||
273 | }, | ||
274 | }; | ||
275 | |||
276 | struct pmx_dev pmx_pwm2 = { | ||
277 | .name = "pwm2", | ||
278 | .modes = pmx_pwm2_modes, | ||
279 | .mode_count = ARRAY_SIZE(pmx_pwm2_modes), | ||
280 | .enb_on_reset = 1, | ||
281 | }; | ||
282 | |||
283 | struct pmx_dev_mode pmx_pwm3_modes[] = { | ||
284 | { | ||
285 | .ids = AUTO_EXP_MODE | SMALL_PRINTERS_MODE | AUTO_NET_SMII_MODE, | ||
286 | .mask = PMX_MII_MASK, | ||
287 | }, | ||
288 | }; | ||
289 | |||
290 | struct pmx_dev pmx_pwm3 = { | ||
291 | .name = "pwm3", | ||
292 | .modes = pmx_pwm3_modes, | ||
293 | .mode_count = ARRAY_SIZE(pmx_pwm3_modes), | ||
294 | .enb_on_reset = 1, | ||
295 | }; | ||
296 | |||
297 | struct pmx_dev_mode pmx_ssp1_modes[] = { | ||
298 | { | ||
299 | .ids = SMALL_PRINTERS_MODE | AUTO_NET_SMII_MODE, | ||
300 | .mask = PMX_MII_MASK, | ||
301 | }, | ||
302 | }; | ||
303 | |||
304 | struct pmx_dev pmx_ssp1 = { | ||
305 | .name = "ssp1", | ||
306 | .modes = pmx_ssp1_modes, | ||
307 | .mode_count = ARRAY_SIZE(pmx_ssp1_modes), | ||
308 | .enb_on_reset = 1, | ||
309 | }; | ||
310 | |||
311 | struct pmx_dev_mode pmx_ssp2_modes[] = { | ||
312 | { | ||
313 | .ids = AUTO_NET_SMII_MODE, | ||
314 | .mask = PMX_MII_MASK, | ||
315 | }, | ||
316 | }; | ||
317 | |||
318 | struct pmx_dev pmx_ssp2 = { | ||
319 | .name = "ssp2", | ||
320 | .modes = pmx_ssp2_modes, | ||
321 | .mode_count = ARRAY_SIZE(pmx_ssp2_modes), | ||
322 | .enb_on_reset = 1, | ||
323 | }; | ||
324 | |||
325 | struct pmx_dev_mode pmx_mii1_modes[] = { | ||
326 | { | ||
327 | .ids = AUTO_NET_MII_MODE, | ||
328 | .mask = 0x0, | ||
329 | }, | ||
330 | }; | ||
331 | |||
332 | struct pmx_dev pmx_mii1 = { | ||
333 | .name = "mii1", | ||
334 | .modes = pmx_mii1_modes, | ||
335 | .mode_count = ARRAY_SIZE(pmx_mii1_modes), | ||
336 | .enb_on_reset = 1, | ||
337 | }; | ||
338 | |||
339 | struct pmx_dev_mode pmx_smii0_modes[] = { | ||
340 | { | ||
341 | .ids = AUTO_NET_SMII_MODE | AUTO_EXP_MODE | SMALL_PRINTERS_MODE, | ||
342 | .mask = PMX_MII_MASK, | ||
343 | }, | ||
344 | }; | ||
345 | |||
346 | struct pmx_dev pmx_smii0 = { | ||
347 | .name = "smii0", | ||
348 | .modes = pmx_smii0_modes, | ||
349 | .mode_count = ARRAY_SIZE(pmx_smii0_modes), | ||
350 | .enb_on_reset = 1, | ||
351 | }; | ||
352 | |||
353 | struct pmx_dev_mode pmx_smii1_modes[] = { | ||
354 | { | ||
355 | .ids = AUTO_NET_SMII_MODE | SMALL_PRINTERS_MODE, | ||
356 | .mask = PMX_MII_MASK, | ||
357 | }, | ||
358 | }; | ||
359 | |||
360 | struct pmx_dev pmx_smii1 = { | ||
361 | .name = "smii1", | ||
362 | .modes = pmx_smii1_modes, | ||
363 | .mode_count = ARRAY_SIZE(pmx_smii1_modes), | ||
364 | .enb_on_reset = 1, | ||
365 | }; | ||
366 | |||
367 | struct pmx_dev_mode pmx_i2c1_modes[] = { | ||
368 | { | ||
369 | .ids = AUTO_EXP_MODE, | ||
370 | .mask = 0x0, | ||
371 | }, | ||
372 | }; | ||
373 | |||
374 | struct pmx_dev pmx_i2c1 = { | ||
375 | .name = "i2c1", | ||
376 | .modes = pmx_i2c1_modes, | ||
377 | .mode_count = ARRAY_SIZE(pmx_i2c1_modes), | ||
378 | .enb_on_reset = 1, | ||
379 | }; | ||
380 | |||
381 | /* pmx driver structure */ | ||
382 | struct pmx_driver pmx_driver = { | ||
383 | .mode_reg = {.offset = MODE_CONFIG_REG, .mask = 0x00000007}, | ||
384 | .mux_reg = {.offset = PAD_MUX_CONFIG_REG, .mask = 0x00007fff}, | ||
385 | }; | ||
386 | |||
387 | /* Add spear320 specific devices here */ | ||
388 | |||
389 | /* spear3xx shared irq */ | ||
390 | struct shirq_dev_config shirq_ras1_config[] = { | ||
391 | { | ||
392 | .virq = VIRQ_EMI, | ||
393 | .status_mask = EMI_IRQ_MASK, | ||
394 | .clear_mask = EMI_IRQ_MASK, | ||
395 | }, { | ||
396 | .virq = VIRQ_CLCD, | ||
397 | .status_mask = CLCD_IRQ_MASK, | ||
398 | .clear_mask = CLCD_IRQ_MASK, | ||
399 | }, { | ||
400 | .virq = VIRQ_SPP, | ||
401 | .status_mask = SPP_IRQ_MASK, | ||
402 | .clear_mask = SPP_IRQ_MASK, | ||
403 | }, | ||
404 | }; | ||
405 | |||
406 | struct spear_shirq shirq_ras1 = { | ||
407 | .irq = IRQ_GEN_RAS_1, | ||
408 | .dev_config = shirq_ras1_config, | ||
409 | .dev_count = ARRAY_SIZE(shirq_ras1_config), | ||
410 | .regs = { | ||
411 | .enb_reg = -1, | ||
412 | .status_reg = INT_STS_MASK_REG, | ||
413 | .status_reg_mask = SHIRQ_RAS1_MASK, | ||
414 | .clear_reg = INT_CLR_MASK_REG, | ||
415 | .reset_to_clear = 1, | ||
416 | }, | ||
417 | }; | ||
418 | |||
419 | struct shirq_dev_config shirq_ras3_config[] = { | ||
420 | { | ||
421 | .virq = VIRQ_PLGPIO, | ||
422 | .enb_mask = GPIO_IRQ_MASK, | ||
423 | .status_mask = GPIO_IRQ_MASK, | ||
424 | .clear_mask = GPIO_IRQ_MASK, | ||
425 | }, { | ||
426 | .virq = VIRQ_I2S_PLAY, | ||
427 | .enb_mask = I2S_PLAY_IRQ_MASK, | ||
428 | .status_mask = I2S_PLAY_IRQ_MASK, | ||
429 | .clear_mask = I2S_PLAY_IRQ_MASK, | ||
430 | }, { | ||
431 | .virq = VIRQ_I2S_REC, | ||
432 | .enb_mask = I2S_REC_IRQ_MASK, | ||
433 | .status_mask = I2S_REC_IRQ_MASK, | ||
434 | .clear_mask = I2S_REC_IRQ_MASK, | ||
435 | }, | ||
436 | }; | ||
437 | |||
438 | struct spear_shirq shirq_ras3 = { | ||
439 | .irq = IRQ_GEN_RAS_3, | ||
440 | .dev_config = shirq_ras3_config, | ||
441 | .dev_count = ARRAY_SIZE(shirq_ras3_config), | ||
442 | .regs = { | ||
443 | .enb_reg = INT_ENB_MASK_REG, | ||
444 | .reset_to_enb = 1, | ||
445 | .status_reg = INT_STS_MASK_REG, | ||
446 | .status_reg_mask = SHIRQ_RAS3_MASK, | ||
447 | .clear_reg = INT_CLR_MASK_REG, | ||
448 | .reset_to_clear = 1, | ||
449 | }, | ||
450 | }; | ||
451 | |||
452 | struct shirq_dev_config shirq_intrcomm_ras_config[] = { | ||
453 | { | ||
454 | .virq = VIRQ_CANU, | ||
455 | .status_mask = CAN_U_IRQ_MASK, | ||
456 | .clear_mask = CAN_U_IRQ_MASK, | ||
457 | }, { | ||
458 | .virq = VIRQ_CANL, | ||
459 | .status_mask = CAN_L_IRQ_MASK, | ||
460 | .clear_mask = CAN_L_IRQ_MASK, | ||
461 | }, { | ||
462 | .virq = VIRQ_UART1, | ||
463 | .status_mask = UART1_IRQ_MASK, | ||
464 | .clear_mask = UART1_IRQ_MASK, | ||
465 | }, { | ||
466 | .virq = VIRQ_UART2, | ||
467 | .status_mask = UART2_IRQ_MASK, | ||
468 | .clear_mask = UART2_IRQ_MASK, | ||
469 | }, { | ||
470 | .virq = VIRQ_SSP1, | ||
471 | .status_mask = SSP1_IRQ_MASK, | ||
472 | .clear_mask = SSP1_IRQ_MASK, | ||
473 | }, { | ||
474 | .virq = VIRQ_SSP2, | ||
475 | .status_mask = SSP2_IRQ_MASK, | ||
476 | .clear_mask = SSP2_IRQ_MASK, | ||
477 | }, { | ||
478 | .virq = VIRQ_SMII0, | ||
479 | .status_mask = SMII0_IRQ_MASK, | ||
480 | .clear_mask = SMII0_IRQ_MASK, | ||
481 | }, { | ||
482 | .virq = VIRQ_MII1_SMII1, | ||
483 | .status_mask = MII1_SMII1_IRQ_MASK, | ||
484 | .clear_mask = MII1_SMII1_IRQ_MASK, | ||
485 | }, { | ||
486 | .virq = VIRQ_WAKEUP_SMII0, | ||
487 | .status_mask = WAKEUP_SMII0_IRQ_MASK, | ||
488 | .clear_mask = WAKEUP_SMII0_IRQ_MASK, | ||
489 | }, { | ||
490 | .virq = VIRQ_WAKEUP_MII1_SMII1, | ||
491 | .status_mask = WAKEUP_MII1_SMII1_IRQ_MASK, | ||
492 | .clear_mask = WAKEUP_MII1_SMII1_IRQ_MASK, | ||
493 | }, { | ||
494 | .virq = VIRQ_I2C, | ||
495 | .status_mask = I2C1_IRQ_MASK, | ||
496 | .clear_mask = I2C1_IRQ_MASK, | ||
497 | }, | ||
498 | }; | ||
499 | |||
500 | struct spear_shirq shirq_intrcomm_ras = { | ||
501 | .irq = IRQ_INTRCOMM_RAS_ARM, | ||
502 | .dev_config = shirq_intrcomm_ras_config, | ||
503 | .dev_count = ARRAY_SIZE(shirq_intrcomm_ras_config), | ||
504 | .regs = { | ||
505 | .enb_reg = -1, | ||
506 | .status_reg = INT_STS_MASK_REG, | ||
507 | .status_reg_mask = SHIRQ_INTRCOMM_RAS_MASK, | ||
508 | .clear_reg = INT_CLR_MASK_REG, | ||
509 | .reset_to_clear = 1, | ||
510 | }, | ||
511 | }; | ||
512 | |||
513 | /* spear320 routines */ | ||
514 | void __init spear320_init(void) | ||
515 | { | ||
516 | void __iomem *base; | ||
517 | int ret = 0; | ||
518 | |||
519 | /* call spear3xx family common init function */ | ||
520 | spear3xx_init(); | ||
521 | |||
522 | /* shared irq registeration */ | ||
523 | base = ioremap(SPEAR320_SOC_CONFIG_BASE, SPEAR320_SOC_CONFIG_SIZE); | ||
524 | if (base) { | ||
525 | /* shirq 1 */ | ||
526 | shirq_ras1.regs.base = base; | ||
527 | ret = spear_shirq_register(&shirq_ras1); | ||
528 | if (ret) | ||
529 | printk(KERN_ERR "Error registering Shared IRQ 1\n"); | ||
530 | |||
531 | /* shirq 3 */ | ||
532 | shirq_ras3.regs.base = base; | ||
533 | ret = spear_shirq_register(&shirq_ras3); | ||
534 | if (ret) | ||
535 | printk(KERN_ERR "Error registering Shared IRQ 3\n"); | ||
536 | |||
537 | /* shirq 4 */ | ||
538 | shirq_intrcomm_ras.regs.base = base; | ||
539 | ret = spear_shirq_register(&shirq_intrcomm_ras); | ||
540 | if (ret) | ||
541 | printk(KERN_ERR "Error registering Shared IRQ 4\n"); | ||
542 | } | ||
543 | } | ||
544 | |||
545 | void spear320_pmx_init(void) | ||
546 | { | ||
547 | spear_pmx_init(&pmx_driver, SPEAR320_SOC_CONFIG_BASE, | ||
548 | SPEAR320_SOC_CONFIG_SIZE); | ||
549 | } | ||
diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c new file mode 100644 index 000000000000..62ac685a4135 --- /dev/null +++ b/arch/arm/mach-spear3xx/spear320_evb.c | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/spear320_evb.c | ||
3 | * | ||
4 | * SPEAr320 evaluation board source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <asm/mach/arch.h> | ||
15 | #include <asm/mach-types.h> | ||
16 | #include <mach/generic.h> | ||
17 | #include <mach/spear.h> | ||
18 | |||
19 | /* padmux devices to enable */ | ||
20 | static struct pmx_dev *pmx_devs[] = { | ||
21 | /* spear3xx specific devices */ | ||
22 | &pmx_i2c, | ||
23 | &pmx_ssp, | ||
24 | &pmx_mii, | ||
25 | &pmx_uart0, | ||
26 | |||
27 | /* spear320 specific devices */ | ||
28 | &pmx_fsmc, | ||
29 | &pmx_sdio, | ||
30 | &pmx_i2s, | ||
31 | &pmx_uart1, | ||
32 | &pmx_uart2, | ||
33 | &pmx_can, | ||
34 | &pmx_pwm0, | ||
35 | &pmx_pwm1, | ||
36 | &pmx_pwm2, | ||
37 | &pmx_mii1, | ||
38 | }; | ||
39 | |||
40 | static struct amba_device *amba_devs[] __initdata = { | ||
41 | /* spear3xx specific devices */ | ||
42 | &gpio_device, | ||
43 | &uart_device, | ||
44 | |||
45 | /* spear320 specific devices */ | ||
46 | }; | ||
47 | |||
48 | static struct platform_device *plat_devs[] __initdata = { | ||
49 | /* spear3xx specific devices */ | ||
50 | |||
51 | /* spear320 specific devices */ | ||
52 | }; | ||
53 | |||
54 | static void __init spear320_evb_init(void) | ||
55 | { | ||
56 | unsigned int i; | ||
57 | |||
58 | /* call spear320 machine init function */ | ||
59 | spear320_init(); | ||
60 | |||
61 | /* padmux initialization */ | ||
62 | pmx_driver.mode = &auto_net_mii_mode; | ||
63 | pmx_driver.devs = pmx_devs; | ||
64 | pmx_driver.devs_count = ARRAY_SIZE(pmx_devs); | ||
65 | spear320_pmx_init(); | ||
66 | |||
67 | /* Add Platform Devices */ | ||
68 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); | ||
69 | |||
70 | /* Add Amba Devices */ | ||
71 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) | ||
72 | amba_device_register(amba_devs[i], &iomem_resource); | ||
73 | } | ||
74 | |||
75 | MACHINE_START(SPEAR320, "ST-SPEAR320-EVB") | ||
76 | .boot_params = 0x00000100, | ||
77 | .map_io = spear3xx_map_io, | ||
78 | .init_irq = spear3xx_init_irq, | ||
79 | .timer = &spear_sys_timer, | ||
80 | .init_machine = spear320_evb_init, | ||
81 | MACHINE_END | ||
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c new file mode 100644 index 000000000000..e87313aeae20 --- /dev/null +++ b/arch/arm/mach-spear3xx/spear3xx.c | |||
@@ -0,0 +1,548 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear3xx/spear3xx.c | ||
3 | * | ||
4 | * SPEAr3XX machines common source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | #include <linux/amba/pl061.h> | ||
16 | #include <linux/ptrace.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <asm/hardware/vic.h> | ||
19 | #include <asm/irq.h> | ||
20 | #include <asm/mach/arch.h> | ||
21 | #include <mach/generic.h> | ||
22 | #include <mach/spear.h> | ||
23 | |||
24 | /* Add spear3xx machines common devices here */ | ||
25 | /* gpio device registeration */ | ||
26 | static struct pl061_platform_data gpio_plat_data = { | ||
27 | .gpio_base = 0, | ||
28 | .irq_base = SPEAR_GPIO_INT_BASE, | ||
29 | }; | ||
30 | |||
31 | struct amba_device gpio_device = { | ||
32 | .dev = { | ||
33 | .init_name = "gpio", | ||
34 | .platform_data = &gpio_plat_data, | ||
35 | }, | ||
36 | .res = { | ||
37 | .start = SPEAR3XX_ICM3_GPIO_BASE, | ||
38 | .end = SPEAR3XX_ICM3_GPIO_BASE + SPEAR3XX_ICM3_GPIO_SIZE - 1, | ||
39 | .flags = IORESOURCE_MEM, | ||
40 | }, | ||
41 | .irq = {IRQ_BASIC_GPIO, NO_IRQ}, | ||
42 | }; | ||
43 | |||
44 | /* uart device registeration */ | ||
45 | struct amba_device uart_device = { | ||
46 | .dev = { | ||
47 | .init_name = "uart", | ||
48 | }, | ||
49 | .res = { | ||
50 | .start = SPEAR3XX_ICM1_UART_BASE, | ||
51 | .end = SPEAR3XX_ICM1_UART_BASE + SPEAR3XX_ICM1_UART_SIZE - 1, | ||
52 | .flags = IORESOURCE_MEM, | ||
53 | }, | ||
54 | .irq = {IRQ_UART, NO_IRQ}, | ||
55 | }; | ||
56 | |||
57 | /* Do spear3xx familiy common initialization part here */ | ||
58 | void __init spear3xx_init(void) | ||
59 | { | ||
60 | /* nothing to do for now */ | ||
61 | } | ||
62 | |||
63 | /* This will initialize vic */ | ||
64 | void __init spear3xx_init_irq(void) | ||
65 | { | ||
66 | vic_init((void __iomem *)VA_SPEAR3XX_ML1_VIC_BASE, 0, ~0, 0); | ||
67 | } | ||
68 | |||
69 | /* Following will create static virtual/physical mappings */ | ||
70 | struct map_desc spear3xx_io_desc[] __initdata = { | ||
71 | { | ||
72 | .virtual = VA_SPEAR3XX_ICM1_UART_BASE, | ||
73 | .pfn = __phys_to_pfn(SPEAR3XX_ICM1_UART_BASE), | ||
74 | .length = SPEAR3XX_ICM1_UART_SIZE, | ||
75 | .type = MT_DEVICE | ||
76 | }, { | ||
77 | .virtual = VA_SPEAR3XX_ML1_VIC_BASE, | ||
78 | .pfn = __phys_to_pfn(SPEAR3XX_ML1_VIC_BASE), | ||
79 | .length = SPEAR3XX_ML1_VIC_SIZE, | ||
80 | .type = MT_DEVICE | ||
81 | }, { | ||
82 | .virtual = VA_SPEAR3XX_ICM3_SYS_CTRL_BASE, | ||
83 | .pfn = __phys_to_pfn(SPEAR3XX_ICM3_SYS_CTRL_BASE), | ||
84 | .length = SPEAR3XX_ICM3_SYS_CTRL_SIZE, | ||
85 | .type = MT_DEVICE | ||
86 | }, { | ||
87 | .virtual = VA_SPEAR3XX_ICM3_MISC_REG_BASE, | ||
88 | .pfn = __phys_to_pfn(SPEAR3XX_ICM3_MISC_REG_BASE), | ||
89 | .length = SPEAR3XX_ICM3_MISC_REG_SIZE, | ||
90 | .type = MT_DEVICE | ||
91 | }, | ||
92 | }; | ||
93 | |||
94 | /* This will create static memory mapping for selected devices */ | ||
95 | void __init spear3xx_map_io(void) | ||
96 | { | ||
97 | iotable_init(spear3xx_io_desc, ARRAY_SIZE(spear3xx_io_desc)); | ||
98 | |||
99 | /* This will initialize clock framework */ | ||
100 | clk_init(); | ||
101 | } | ||
102 | |||
103 | /* pad multiplexing support */ | ||
104 | /* devices */ | ||
105 | struct pmx_dev_mode pmx_firda_modes[] = { | ||
106 | { | ||
107 | .ids = 0xffffffff, | ||
108 | .mask = PMX_FIRDA_MASK, | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | struct pmx_dev pmx_firda = { | ||
113 | .name = "firda", | ||
114 | .modes = pmx_firda_modes, | ||
115 | .mode_count = ARRAY_SIZE(pmx_firda_modes), | ||
116 | .enb_on_reset = 0, | ||
117 | }; | ||
118 | |||
119 | struct pmx_dev_mode pmx_i2c_modes[] = { | ||
120 | { | ||
121 | .ids = 0xffffffff, | ||
122 | .mask = PMX_I2C_MASK, | ||
123 | }, | ||
124 | }; | ||
125 | |||
126 | struct pmx_dev pmx_i2c = { | ||
127 | .name = "i2c", | ||
128 | .modes = pmx_i2c_modes, | ||
129 | .mode_count = ARRAY_SIZE(pmx_i2c_modes), | ||
130 | .enb_on_reset = 0, | ||
131 | }; | ||
132 | |||
133 | struct pmx_dev_mode pmx_ssp_cs_modes[] = { | ||
134 | { | ||
135 | .ids = 0xffffffff, | ||
136 | .mask = PMX_SSP_CS_MASK, | ||
137 | }, | ||
138 | }; | ||
139 | |||
140 | struct pmx_dev pmx_ssp_cs = { | ||
141 | .name = "ssp_chip_selects", | ||
142 | .modes = pmx_ssp_cs_modes, | ||
143 | .mode_count = ARRAY_SIZE(pmx_ssp_cs_modes), | ||
144 | .enb_on_reset = 0, | ||
145 | }; | ||
146 | |||
147 | struct pmx_dev_mode pmx_ssp_modes[] = { | ||
148 | { | ||
149 | .ids = 0xffffffff, | ||
150 | .mask = PMX_SSP_MASK, | ||
151 | }, | ||
152 | }; | ||
153 | |||
154 | struct pmx_dev pmx_ssp = { | ||
155 | .name = "ssp", | ||
156 | .modes = pmx_ssp_modes, | ||
157 | .mode_count = ARRAY_SIZE(pmx_ssp_modes), | ||
158 | .enb_on_reset = 0, | ||
159 | }; | ||
160 | |||
161 | struct pmx_dev_mode pmx_mii_modes[] = { | ||
162 | { | ||
163 | .ids = 0xffffffff, | ||
164 | .mask = PMX_MII_MASK, | ||
165 | }, | ||
166 | }; | ||
167 | |||
168 | struct pmx_dev pmx_mii = { | ||
169 | .name = "mii", | ||
170 | .modes = pmx_mii_modes, | ||
171 | .mode_count = ARRAY_SIZE(pmx_mii_modes), | ||
172 | .enb_on_reset = 0, | ||
173 | }; | ||
174 | |||
175 | struct pmx_dev_mode pmx_gpio_pin0_modes[] = { | ||
176 | { | ||
177 | .ids = 0xffffffff, | ||
178 | .mask = PMX_GPIO_PIN0_MASK, | ||
179 | }, | ||
180 | }; | ||
181 | |||
182 | struct pmx_dev pmx_gpio_pin0 = { | ||
183 | .name = "gpio_pin0", | ||
184 | .modes = pmx_gpio_pin0_modes, | ||
185 | .mode_count = ARRAY_SIZE(pmx_gpio_pin0_modes), | ||
186 | .enb_on_reset = 0, | ||
187 | }; | ||
188 | |||
189 | struct pmx_dev_mode pmx_gpio_pin1_modes[] = { | ||
190 | { | ||
191 | .ids = 0xffffffff, | ||
192 | .mask = PMX_GPIO_PIN1_MASK, | ||
193 | }, | ||
194 | }; | ||
195 | |||
196 | struct pmx_dev pmx_gpio_pin1 = { | ||
197 | .name = "gpio_pin1", | ||
198 | .modes = pmx_gpio_pin1_modes, | ||
199 | .mode_count = ARRAY_SIZE(pmx_gpio_pin1_modes), | ||
200 | .enb_on_reset = 0, | ||
201 | }; | ||
202 | |||
203 | struct pmx_dev_mode pmx_gpio_pin2_modes[] = { | ||
204 | { | ||
205 | .ids = 0xffffffff, | ||
206 | .mask = PMX_GPIO_PIN2_MASK, | ||
207 | }, | ||
208 | }; | ||
209 | |||
210 | struct pmx_dev pmx_gpio_pin2 = { | ||
211 | .name = "gpio_pin2", | ||
212 | .modes = pmx_gpio_pin2_modes, | ||
213 | .mode_count = ARRAY_SIZE(pmx_gpio_pin2_modes), | ||
214 | .enb_on_reset = 0, | ||
215 | }; | ||
216 | |||
217 | struct pmx_dev_mode pmx_gpio_pin3_modes[] = { | ||
218 | { | ||
219 | .ids = 0xffffffff, | ||
220 | .mask = PMX_GPIO_PIN3_MASK, | ||
221 | }, | ||
222 | }; | ||
223 | |||
224 | struct pmx_dev pmx_gpio_pin3 = { | ||
225 | .name = "gpio_pin3", | ||
226 | .modes = pmx_gpio_pin3_modes, | ||
227 | .mode_count = ARRAY_SIZE(pmx_gpio_pin3_modes), | ||
228 | .enb_on_reset = 0, | ||
229 | }; | ||
230 | |||
231 | struct pmx_dev_mode pmx_gpio_pin4_modes[] = { | ||
232 | { | ||
233 | .ids = 0xffffffff, | ||
234 | .mask = PMX_GPIO_PIN4_MASK, | ||
235 | }, | ||
236 | }; | ||
237 | |||
238 | struct pmx_dev pmx_gpio_pin4 = { | ||
239 | .name = "gpio_pin4", | ||
240 | .modes = pmx_gpio_pin4_modes, | ||
241 | .mode_count = ARRAY_SIZE(pmx_gpio_pin4_modes), | ||
242 | .enb_on_reset = 0, | ||
243 | }; | ||
244 | |||
245 | struct pmx_dev_mode pmx_gpio_pin5_modes[] = { | ||
246 | { | ||
247 | .ids = 0xffffffff, | ||
248 | .mask = PMX_GPIO_PIN5_MASK, | ||
249 | }, | ||
250 | }; | ||
251 | |||
252 | struct pmx_dev pmx_gpio_pin5 = { | ||
253 | .name = "gpio_pin5", | ||
254 | .modes = pmx_gpio_pin5_modes, | ||
255 | .mode_count = ARRAY_SIZE(pmx_gpio_pin5_modes), | ||
256 | .enb_on_reset = 0, | ||
257 | }; | ||
258 | |||
259 | struct pmx_dev_mode pmx_uart0_modem_modes[] = { | ||
260 | { | ||
261 | .ids = 0xffffffff, | ||
262 | .mask = PMX_UART0_MODEM_MASK, | ||
263 | }, | ||
264 | }; | ||
265 | |||
266 | struct pmx_dev pmx_uart0_modem = { | ||
267 | .name = "uart0_modem", | ||
268 | .modes = pmx_uart0_modem_modes, | ||
269 | .mode_count = ARRAY_SIZE(pmx_uart0_modem_modes), | ||
270 | .enb_on_reset = 0, | ||
271 | }; | ||
272 | |||
273 | struct pmx_dev_mode pmx_uart0_modes[] = { | ||
274 | { | ||
275 | .ids = 0xffffffff, | ||
276 | .mask = PMX_UART0_MASK, | ||
277 | }, | ||
278 | }; | ||
279 | |||
280 | struct pmx_dev pmx_uart0 = { | ||
281 | .name = "uart0", | ||
282 | .modes = pmx_uart0_modes, | ||
283 | .mode_count = ARRAY_SIZE(pmx_uart0_modes), | ||
284 | .enb_on_reset = 0, | ||
285 | }; | ||
286 | |||
287 | struct pmx_dev_mode pmx_timer_3_4_modes[] = { | ||
288 | { | ||
289 | .ids = 0xffffffff, | ||
290 | .mask = PMX_TIMER_3_4_MASK, | ||
291 | }, | ||
292 | }; | ||
293 | |||
294 | struct pmx_dev pmx_timer_3_4 = { | ||
295 | .name = "timer_3_4", | ||
296 | .modes = pmx_timer_3_4_modes, | ||
297 | .mode_count = ARRAY_SIZE(pmx_timer_3_4_modes), | ||
298 | .enb_on_reset = 0, | ||
299 | }; | ||
300 | |||
301 | struct pmx_dev_mode pmx_timer_1_2_modes[] = { | ||
302 | { | ||
303 | .ids = 0xffffffff, | ||
304 | .mask = PMX_TIMER_1_2_MASK, | ||
305 | }, | ||
306 | }; | ||
307 | |||
308 | struct pmx_dev pmx_timer_1_2 = { | ||
309 | .name = "timer_1_2", | ||
310 | .modes = pmx_timer_1_2_modes, | ||
311 | .mode_count = ARRAY_SIZE(pmx_timer_1_2_modes), | ||
312 | .enb_on_reset = 0, | ||
313 | }; | ||
314 | |||
315 | #if defined(CONFIG_MACH_SPEAR310) || defined(CONFIG_MACH_SPEAR320) | ||
316 | /* plgpios devices */ | ||
317 | struct pmx_dev_mode pmx_plgpio_0_1_modes[] = { | ||
318 | { | ||
319 | .ids = 0x00, | ||
320 | .mask = PMX_FIRDA_MASK, | ||
321 | }, | ||
322 | }; | ||
323 | |||
324 | struct pmx_dev pmx_plgpio_0_1 = { | ||
325 | .name = "plgpio 0 and 1", | ||
326 | .modes = pmx_plgpio_0_1_modes, | ||
327 | .mode_count = ARRAY_SIZE(pmx_plgpio_0_1_modes), | ||
328 | .enb_on_reset = 1, | ||
329 | }; | ||
330 | |||
331 | struct pmx_dev_mode pmx_plgpio_2_3_modes[] = { | ||
332 | { | ||
333 | .ids = 0x00, | ||
334 | .mask = PMX_UART0_MASK, | ||
335 | }, | ||
336 | }; | ||
337 | |||
338 | struct pmx_dev pmx_plgpio_2_3 = { | ||
339 | .name = "plgpio 2 and 3", | ||
340 | .modes = pmx_plgpio_2_3_modes, | ||
341 | .mode_count = ARRAY_SIZE(pmx_plgpio_2_3_modes), | ||
342 | .enb_on_reset = 1, | ||
343 | }; | ||
344 | |||
345 | struct pmx_dev_mode pmx_plgpio_4_5_modes[] = { | ||
346 | { | ||
347 | .ids = 0x00, | ||
348 | .mask = PMX_I2C_MASK, | ||
349 | }, | ||
350 | }; | ||
351 | |||
352 | struct pmx_dev pmx_plgpio_4_5 = { | ||
353 | .name = "plgpio 4 and 5", | ||
354 | .modes = pmx_plgpio_4_5_modes, | ||
355 | .mode_count = ARRAY_SIZE(pmx_plgpio_4_5_modes), | ||
356 | .enb_on_reset = 1, | ||
357 | }; | ||
358 | |||
359 | struct pmx_dev_mode pmx_plgpio_6_9_modes[] = { | ||
360 | { | ||
361 | .ids = 0x00, | ||
362 | .mask = PMX_SSP_MASK, | ||
363 | }, | ||
364 | }; | ||
365 | |||
366 | struct pmx_dev pmx_plgpio_6_9 = { | ||
367 | .name = "plgpio 6 to 9", | ||
368 | .modes = pmx_plgpio_6_9_modes, | ||
369 | .mode_count = ARRAY_SIZE(pmx_plgpio_6_9_modes), | ||
370 | .enb_on_reset = 1, | ||
371 | }; | ||
372 | |||
373 | struct pmx_dev_mode pmx_plgpio_10_27_modes[] = { | ||
374 | { | ||
375 | .ids = 0x00, | ||
376 | .mask = PMX_MII_MASK, | ||
377 | }, | ||
378 | }; | ||
379 | |||
380 | struct pmx_dev pmx_plgpio_10_27 = { | ||
381 | .name = "plgpio 10 to 27", | ||
382 | .modes = pmx_plgpio_10_27_modes, | ||
383 | .mode_count = ARRAY_SIZE(pmx_plgpio_10_27_modes), | ||
384 | .enb_on_reset = 1, | ||
385 | }; | ||
386 | |||
387 | struct pmx_dev_mode pmx_plgpio_28_modes[] = { | ||
388 | { | ||
389 | .ids = 0x00, | ||
390 | .mask = PMX_GPIO_PIN0_MASK, | ||
391 | }, | ||
392 | }; | ||
393 | |||
394 | struct pmx_dev pmx_plgpio_28 = { | ||
395 | .name = "plgpio 28", | ||
396 | .modes = pmx_plgpio_28_modes, | ||
397 | .mode_count = ARRAY_SIZE(pmx_plgpio_28_modes), | ||
398 | .enb_on_reset = 1, | ||
399 | }; | ||
400 | |||
401 | struct pmx_dev_mode pmx_plgpio_29_modes[] = { | ||
402 | { | ||
403 | .ids = 0x00, | ||
404 | .mask = PMX_GPIO_PIN1_MASK, | ||
405 | }, | ||
406 | }; | ||
407 | |||
408 | struct pmx_dev pmx_plgpio_29 = { | ||
409 | .name = "plgpio 29", | ||
410 | .modes = pmx_plgpio_29_modes, | ||
411 | .mode_count = ARRAY_SIZE(pmx_plgpio_29_modes), | ||
412 | .enb_on_reset = 1, | ||
413 | }; | ||
414 | |||
415 | struct pmx_dev_mode pmx_plgpio_30_modes[] = { | ||
416 | { | ||
417 | .ids = 0x00, | ||
418 | .mask = PMX_GPIO_PIN2_MASK, | ||
419 | }, | ||
420 | }; | ||
421 | |||
422 | struct pmx_dev pmx_plgpio_30 = { | ||
423 | .name = "plgpio 30", | ||
424 | .modes = pmx_plgpio_30_modes, | ||
425 | .mode_count = ARRAY_SIZE(pmx_plgpio_30_modes), | ||
426 | .enb_on_reset = 1, | ||
427 | }; | ||
428 | |||
429 | struct pmx_dev_mode pmx_plgpio_31_modes[] = { | ||
430 | { | ||
431 | .ids = 0x00, | ||
432 | .mask = PMX_GPIO_PIN3_MASK, | ||
433 | }, | ||
434 | }; | ||
435 | |||
436 | struct pmx_dev pmx_plgpio_31 = { | ||
437 | .name = "plgpio 31", | ||
438 | .modes = pmx_plgpio_31_modes, | ||
439 | .mode_count = ARRAY_SIZE(pmx_plgpio_31_modes), | ||
440 | .enb_on_reset = 1, | ||
441 | }; | ||
442 | |||
443 | struct pmx_dev_mode pmx_plgpio_32_modes[] = { | ||
444 | { | ||
445 | .ids = 0x00, | ||
446 | .mask = PMX_GPIO_PIN4_MASK, | ||
447 | }, | ||
448 | }; | ||
449 | |||
450 | struct pmx_dev pmx_plgpio_32 = { | ||
451 | .name = "plgpio 32", | ||
452 | .modes = pmx_plgpio_32_modes, | ||
453 | .mode_count = ARRAY_SIZE(pmx_plgpio_32_modes), | ||
454 | .enb_on_reset = 1, | ||
455 | }; | ||
456 | |||
457 | struct pmx_dev_mode pmx_plgpio_33_modes[] = { | ||
458 | { | ||
459 | .ids = 0x00, | ||
460 | .mask = PMX_GPIO_PIN5_MASK, | ||
461 | }, | ||
462 | }; | ||
463 | |||
464 | struct pmx_dev pmx_plgpio_33 = { | ||
465 | .name = "plgpio 33", | ||
466 | .modes = pmx_plgpio_33_modes, | ||
467 | .mode_count = ARRAY_SIZE(pmx_plgpio_33_modes), | ||
468 | .enb_on_reset = 1, | ||
469 | }; | ||
470 | |||
471 | struct pmx_dev_mode pmx_plgpio_34_36_modes[] = { | ||
472 | { | ||
473 | .ids = 0x00, | ||
474 | .mask = PMX_SSP_CS_MASK, | ||
475 | }, | ||
476 | }; | ||
477 | |||
478 | struct pmx_dev pmx_plgpio_34_36 = { | ||
479 | .name = "plgpio 34 to 36", | ||
480 | .modes = pmx_plgpio_34_36_modes, | ||
481 | .mode_count = ARRAY_SIZE(pmx_plgpio_34_36_modes), | ||
482 | .enb_on_reset = 1, | ||
483 | }; | ||
484 | |||
485 | struct pmx_dev_mode pmx_plgpio_37_42_modes[] = { | ||
486 | { | ||
487 | .ids = 0x00, | ||
488 | .mask = PMX_UART0_MODEM_MASK, | ||
489 | }, | ||
490 | }; | ||
491 | |||
492 | struct pmx_dev pmx_plgpio_37_42 = { | ||
493 | .name = "plgpio 37 to 42", | ||
494 | .modes = pmx_plgpio_37_42_modes, | ||
495 | .mode_count = ARRAY_SIZE(pmx_plgpio_37_42_modes), | ||
496 | .enb_on_reset = 1, | ||
497 | }; | ||
498 | |||
499 | struct pmx_dev_mode pmx_plgpio_43_44_47_48_modes[] = { | ||
500 | { | ||
501 | .ids = 0x00, | ||
502 | .mask = PMX_TIMER_1_2_MASK, | ||
503 | }, | ||
504 | }; | ||
505 | |||
506 | struct pmx_dev pmx_plgpio_43_44_47_48 = { | ||
507 | .name = "plgpio 43, 44, 47 and 48", | ||
508 | .modes = pmx_plgpio_43_44_47_48_modes, | ||
509 | .mode_count = ARRAY_SIZE(pmx_plgpio_43_44_47_48_modes), | ||
510 | .enb_on_reset = 1, | ||
511 | }; | ||
512 | |||
513 | struct pmx_dev_mode pmx_plgpio_45_46_49_50_modes[] = { | ||
514 | { | ||
515 | .ids = 0x00, | ||
516 | .mask = PMX_TIMER_3_4_MASK, | ||
517 | }, | ||
518 | }; | ||
519 | |||
520 | struct pmx_dev pmx_plgpio_45_46_49_50 = { | ||
521 | .name = "plgpio 45, 46, 49 and 50", | ||
522 | .modes = pmx_plgpio_45_46_49_50_modes, | ||
523 | .mode_count = ARRAY_SIZE(pmx_plgpio_45_46_49_50_modes), | ||
524 | .enb_on_reset = 1, | ||
525 | }; | ||
526 | |||
527 | #endif | ||
528 | |||
529 | /* spear padmux initialization function */ | ||
530 | void spear_pmx_init(struct pmx_driver *pmx_driver, uint base, uint size) | ||
531 | { | ||
532 | int ret = 0; | ||
533 | |||
534 | /* pad mux initialization */ | ||
535 | pmx_driver->base = ioremap(base, size); | ||
536 | if (!pmx_driver->base) { | ||
537 | ret = -ENOMEM; | ||
538 | goto pmx_fail; | ||
539 | } | ||
540 | |||
541 | ret = pmx_register(pmx_driver); | ||
542 | iounmap(pmx_driver->base); | ||
543 | |||
544 | pmx_fail: | ||
545 | if (ret) | ||
546 | printk(KERN_ERR "padmux: registeration failed. err no: %d\n", | ||
547 | ret); | ||
548 | } | ||
diff --git a/arch/arm/mach-spear6xx/Kconfig b/arch/arm/mach-spear6xx/Kconfig new file mode 100644 index 000000000000..bddba034f862 --- /dev/null +++ b/arch/arm/mach-spear6xx/Kconfig | |||
@@ -0,0 +1,20 @@ | |||
1 | # | ||
2 | # SPEAr6XX Machine configuration file | ||
3 | # | ||
4 | |||
5 | if ARCH_SPEAR6XX | ||
6 | |||
7 | choice | ||
8 | prompt "SPEAr6XX Family" | ||
9 | default MACH_SPEAR600 | ||
10 | |||
11 | config MACH_SPEAR600 | ||
12 | bool "SPEAr600" | ||
13 | help | ||
14 | Supports ST SPEAr600 Machine | ||
15 | endchoice | ||
16 | |||
17 | # Adding SPEAr6XX machine specific configuration files | ||
18 | source "arch/arm/mach-spear6xx/Kconfig600" | ||
19 | |||
20 | endif #ARCH_SPEAR6XX | ||
diff --git a/arch/arm/mach-spear6xx/Kconfig600 b/arch/arm/mach-spear6xx/Kconfig600 new file mode 100644 index 000000000000..9e19f65eb78e --- /dev/null +++ b/arch/arm/mach-spear6xx/Kconfig600 | |||
@@ -0,0 +1,17 @@ | |||
1 | # | ||
2 | # SPEAr600 machine configuration file | ||
3 | # | ||
4 | |||
5 | if MACH_SPEAR600 | ||
6 | |||
7 | choice | ||
8 | prompt "SPEAr600 Boards" | ||
9 | default BOARD_SPEAR600_EVB | ||
10 | |||
11 | config BOARD_SPEAR600_EVB | ||
12 | bool "SPEAr600 Evaluation Board" | ||
13 | help | ||
14 | Supports ST SPEAr600 Evaluation Board | ||
15 | endchoice | ||
16 | |||
17 | endif #MACH_SPEAR600 | ||
diff --git a/arch/arm/mach-spear6xx/Makefile b/arch/arm/mach-spear6xx/Makefile new file mode 100644 index 000000000000..cc1a4d82d459 --- /dev/null +++ b/arch/arm/mach-spear6xx/Makefile | |||
@@ -0,0 +1,12 @@ | |||
1 | # | ||
2 | # Makefile for SPEAr6XX machine series | ||
3 | # | ||
4 | |||
5 | # common files | ||
6 | obj-y += clock.o spear6xx.o | ||
7 | |||
8 | # spear600 specific files | ||
9 | obj-$(CONFIG_MACH_SPEAR600) += spear600.o | ||
10 | |||
11 | # spear600 boards files | ||
12 | obj-$(CONFIG_BOARD_SPEAR600_EVB) += spear600_evb.o | ||
diff --git a/arch/arm/mach-spear6xx/Makefile.boot b/arch/arm/mach-spear6xx/Makefile.boot new file mode 100644 index 000000000000..7a1f3c0eadb8 --- /dev/null +++ b/arch/arm/mach-spear6xx/Makefile.boot | |||
@@ -0,0 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | ||
2 | params_phys-y := 0x00000100 | ||
3 | initrd_phys-y := 0x00800000 | ||
diff --git a/arch/arm/mach-spear6xx/clock.c b/arch/arm/mach-spear6xx/clock.c new file mode 100644 index 000000000000..13e27c769685 --- /dev/null +++ b/arch/arm/mach-spear6xx/clock.c | |||
@@ -0,0 +1,483 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/clock.c | ||
3 | * | ||
4 | * SPEAr6xx machines clock framework source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <mach/misc_regs.h> | ||
17 | #include <plat/clock.h> | ||
18 | |||
19 | /* root clks */ | ||
20 | /* 32 KHz oscillator clock */ | ||
21 | static struct clk osc_32k_clk = { | ||
22 | .flags = ALWAYS_ENABLED, | ||
23 | .rate = 32000, | ||
24 | }; | ||
25 | |||
26 | /* 30 MHz oscillator clock */ | ||
27 | static struct clk osc_30m_clk = { | ||
28 | .flags = ALWAYS_ENABLED, | ||
29 | .rate = 30000000, | ||
30 | }; | ||
31 | |||
32 | /* clock derived from 32 KHz osc clk */ | ||
33 | /* rtc clock */ | ||
34 | static struct clk rtc_clk = { | ||
35 | .pclk = &osc_32k_clk, | ||
36 | .en_reg = PERIP1_CLK_ENB, | ||
37 | .en_reg_bit = RTC_CLK_ENB, | ||
38 | .recalc = &follow_parent, | ||
39 | }; | ||
40 | |||
41 | /* clock derived from 30 MHz osc clk */ | ||
42 | /* pll1 configuration structure */ | ||
43 | static struct pll_clk_config pll1_config = { | ||
44 | .mode_reg = PLL1_CTR, | ||
45 | .cfg_reg = PLL1_FRQ, | ||
46 | }; | ||
47 | |||
48 | /* PLL1 clock */ | ||
49 | static struct clk pll1_clk = { | ||
50 | .pclk = &osc_30m_clk, | ||
51 | .en_reg = PLL1_CTR, | ||
52 | .en_reg_bit = PLL_ENABLE, | ||
53 | .recalc = &pll1_clk_recalc, | ||
54 | .private_data = &pll1_config, | ||
55 | }; | ||
56 | |||
57 | /* PLL3 48 MHz clock */ | ||
58 | static struct clk pll3_48m_clk = { | ||
59 | .flags = ALWAYS_ENABLED, | ||
60 | .pclk = &osc_30m_clk, | ||
61 | .rate = 48000000, | ||
62 | }; | ||
63 | |||
64 | /* watch dog timer clock */ | ||
65 | static struct clk wdt_clk = { | ||
66 | .flags = ALWAYS_ENABLED, | ||
67 | .pclk = &osc_30m_clk, | ||
68 | .recalc = &follow_parent, | ||
69 | }; | ||
70 | |||
71 | /* clock derived from pll1 clk */ | ||
72 | /* cpu clock */ | ||
73 | static struct clk cpu_clk = { | ||
74 | .flags = ALWAYS_ENABLED, | ||
75 | .pclk = &pll1_clk, | ||
76 | .recalc = &follow_parent, | ||
77 | }; | ||
78 | |||
79 | /* ahb configuration structure */ | ||
80 | static struct bus_clk_config ahb_config = { | ||
81 | .reg = CORE_CLK_CFG, | ||
82 | .mask = PLL_HCLK_RATIO_MASK, | ||
83 | .shift = PLL_HCLK_RATIO_SHIFT, | ||
84 | }; | ||
85 | |||
86 | /* ahb clock */ | ||
87 | static struct clk ahb_clk = { | ||
88 | .flags = ALWAYS_ENABLED, | ||
89 | .pclk = &pll1_clk, | ||
90 | .recalc = &bus_clk_recalc, | ||
91 | .private_data = &ahb_config, | ||
92 | }; | ||
93 | |||
94 | /* uart parents */ | ||
95 | static struct pclk_info uart_pclk_info[] = { | ||
96 | { | ||
97 | .pclk = &pll1_clk, | ||
98 | .pclk_mask = AUX_CLK_PLL1_MASK, | ||
99 | .scalable = 1, | ||
100 | }, { | ||
101 | .pclk = &pll3_48m_clk, | ||
102 | .pclk_mask = AUX_CLK_PLL3_MASK, | ||
103 | .scalable = 0, | ||
104 | }, | ||
105 | }; | ||
106 | |||
107 | /* uart parent select structure */ | ||
108 | static struct pclk_sel uart_pclk_sel = { | ||
109 | .pclk_info = uart_pclk_info, | ||
110 | .pclk_count = ARRAY_SIZE(uart_pclk_info), | ||
111 | .pclk_sel_reg = PERIP_CLK_CFG, | ||
112 | .pclk_sel_mask = UART_CLK_MASK, | ||
113 | }; | ||
114 | |||
115 | /* uart configurations */ | ||
116 | static struct aux_clk_config uart_config = { | ||
117 | .synth_reg = UART_CLK_SYNT, | ||
118 | }; | ||
119 | |||
120 | /* uart0 clock */ | ||
121 | static struct clk uart0_clk = { | ||
122 | .en_reg = PERIP1_CLK_ENB, | ||
123 | .en_reg_bit = UART0_CLK_ENB, | ||
124 | .pclk_sel = &uart_pclk_sel, | ||
125 | .pclk_sel_shift = UART_CLK_SHIFT, | ||
126 | .recalc = &aux_clk_recalc, | ||
127 | .private_data = &uart_config, | ||
128 | }; | ||
129 | |||
130 | /* uart1 clock */ | ||
131 | static struct clk uart1_clk = { | ||
132 | .en_reg = PERIP1_CLK_ENB, | ||
133 | .en_reg_bit = UART1_CLK_ENB, | ||
134 | .pclk_sel = &uart_pclk_sel, | ||
135 | .pclk_sel_shift = UART_CLK_SHIFT, | ||
136 | .recalc = &aux_clk_recalc, | ||
137 | .private_data = &uart_config, | ||
138 | }; | ||
139 | |||
140 | /* firda configurations */ | ||
141 | static struct aux_clk_config firda_config = { | ||
142 | .synth_reg = FIRDA_CLK_SYNT, | ||
143 | }; | ||
144 | |||
145 | /* firda parents */ | ||
146 | static struct pclk_info firda_pclk_info[] = { | ||
147 | { | ||
148 | .pclk = &pll1_clk, | ||
149 | .pclk_mask = AUX_CLK_PLL1_MASK, | ||
150 | .scalable = 1, | ||
151 | }, { | ||
152 | .pclk = &pll3_48m_clk, | ||
153 | .pclk_mask = AUX_CLK_PLL3_MASK, | ||
154 | .scalable = 0, | ||
155 | }, | ||
156 | }; | ||
157 | |||
158 | /* firda parent select structure */ | ||
159 | static struct pclk_sel firda_pclk_sel = { | ||
160 | .pclk_info = firda_pclk_info, | ||
161 | .pclk_count = ARRAY_SIZE(firda_pclk_info), | ||
162 | .pclk_sel_reg = PERIP_CLK_CFG, | ||
163 | .pclk_sel_mask = FIRDA_CLK_MASK, | ||
164 | }; | ||
165 | |||
166 | /* firda clock */ | ||
167 | static struct clk firda_clk = { | ||
168 | .en_reg = PERIP1_CLK_ENB, | ||
169 | .en_reg_bit = FIRDA_CLK_ENB, | ||
170 | .pclk_sel = &firda_pclk_sel, | ||
171 | .pclk_sel_shift = FIRDA_CLK_SHIFT, | ||
172 | .recalc = &aux_clk_recalc, | ||
173 | .private_data = &firda_config, | ||
174 | }; | ||
175 | |||
176 | /* clcd configurations */ | ||
177 | static struct aux_clk_config clcd_config = { | ||
178 | .synth_reg = CLCD_CLK_SYNT, | ||
179 | }; | ||
180 | |||
181 | /* clcd parents */ | ||
182 | static struct pclk_info clcd_pclk_info[] = { | ||
183 | { | ||
184 | .pclk = &pll1_clk, | ||
185 | .pclk_mask = AUX_CLK_PLL1_MASK, | ||
186 | .scalable = 1, | ||
187 | }, { | ||
188 | .pclk = &pll3_48m_clk, | ||
189 | .pclk_mask = AUX_CLK_PLL3_MASK, | ||
190 | .scalable = 0, | ||
191 | }, | ||
192 | }; | ||
193 | |||
194 | /* clcd parent select structure */ | ||
195 | static struct pclk_sel clcd_pclk_sel = { | ||
196 | .pclk_info = clcd_pclk_info, | ||
197 | .pclk_count = ARRAY_SIZE(clcd_pclk_info), | ||
198 | .pclk_sel_reg = PERIP_CLK_CFG, | ||
199 | .pclk_sel_mask = CLCD_CLK_MASK, | ||
200 | }; | ||
201 | |||
202 | /* clcd clock */ | ||
203 | static struct clk clcd_clk = { | ||
204 | .en_reg = PERIP1_CLK_ENB, | ||
205 | .en_reg_bit = CLCD_CLK_ENB, | ||
206 | .pclk_sel = &clcd_pclk_sel, | ||
207 | .pclk_sel_shift = CLCD_CLK_SHIFT, | ||
208 | .recalc = &aux_clk_recalc, | ||
209 | .private_data = &clcd_config, | ||
210 | }; | ||
211 | |||
212 | /* gpt parents */ | ||
213 | static struct pclk_info gpt_pclk_info[] = { | ||
214 | { | ||
215 | .pclk = &pll1_clk, | ||
216 | .pclk_mask = AUX_CLK_PLL1_MASK, | ||
217 | .scalable = 1, | ||
218 | }, { | ||
219 | .pclk = &pll3_48m_clk, | ||
220 | .pclk_mask = AUX_CLK_PLL3_MASK, | ||
221 | .scalable = 0, | ||
222 | }, | ||
223 | }; | ||
224 | |||
225 | /* gpt parent select structure */ | ||
226 | static struct pclk_sel gpt_pclk_sel = { | ||
227 | .pclk_info = gpt_pclk_info, | ||
228 | .pclk_count = ARRAY_SIZE(gpt_pclk_info), | ||
229 | .pclk_sel_reg = PERIP_CLK_CFG, | ||
230 | .pclk_sel_mask = GPT_CLK_MASK, | ||
231 | }; | ||
232 | |||
233 | /* gpt0_1 configurations */ | ||
234 | static struct aux_clk_config gpt0_1_config = { | ||
235 | .synth_reg = PRSC1_CLK_CFG, | ||
236 | }; | ||
237 | |||
238 | /* gpt0 ARM1 subsystem timer clock */ | ||
239 | static struct clk gpt0_clk = { | ||
240 | .flags = ALWAYS_ENABLED, | ||
241 | .pclk_sel = &gpt_pclk_sel, | ||
242 | .pclk_sel_shift = GPT0_CLK_SHIFT, | ||
243 | .recalc = &gpt_clk_recalc, | ||
244 | .private_data = &gpt0_1_config, | ||
245 | }; | ||
246 | |||
247 | /* gpt1 timer clock */ | ||
248 | static struct clk gpt1_clk = { | ||
249 | .flags = ALWAYS_ENABLED, | ||
250 | .pclk_sel = &gpt_pclk_sel, | ||
251 | .pclk_sel_shift = GPT1_CLK_SHIFT, | ||
252 | .recalc = &gpt_clk_recalc, | ||
253 | .private_data = &gpt0_1_config, | ||
254 | }; | ||
255 | |||
256 | /* gpt2 configurations */ | ||
257 | static struct aux_clk_config gpt2_config = { | ||
258 | .synth_reg = PRSC2_CLK_CFG, | ||
259 | }; | ||
260 | |||
261 | /* gpt2 timer clock */ | ||
262 | static struct clk gpt2_clk = { | ||
263 | .en_reg = PERIP1_CLK_ENB, | ||
264 | .en_reg_bit = GPT2_CLK_ENB, | ||
265 | .pclk_sel = &gpt_pclk_sel, | ||
266 | .pclk_sel_shift = GPT2_CLK_SHIFT, | ||
267 | .recalc = &gpt_clk_recalc, | ||
268 | .private_data = &gpt2_config, | ||
269 | }; | ||
270 | |||
271 | /* gpt3 configurations */ | ||
272 | static struct aux_clk_config gpt3_config = { | ||
273 | .synth_reg = PRSC3_CLK_CFG, | ||
274 | }; | ||
275 | |||
276 | /* gpt3 timer clock */ | ||
277 | static struct clk gpt3_clk = { | ||
278 | .en_reg = PERIP1_CLK_ENB, | ||
279 | .en_reg_bit = GPT3_CLK_ENB, | ||
280 | .pclk_sel = &gpt_pclk_sel, | ||
281 | .pclk_sel_shift = GPT3_CLK_SHIFT, | ||
282 | .recalc = &gpt_clk_recalc, | ||
283 | .private_data = &gpt3_config, | ||
284 | }; | ||
285 | |||
286 | /* clock derived from pll3 clk */ | ||
287 | /* usbh0 clock */ | ||
288 | static struct clk usbh0_clk = { | ||
289 | .pclk = &pll3_48m_clk, | ||
290 | .en_reg = PERIP1_CLK_ENB, | ||
291 | .en_reg_bit = USBH0_CLK_ENB, | ||
292 | .recalc = &follow_parent, | ||
293 | }; | ||
294 | |||
295 | /* usbh1 clock */ | ||
296 | static struct clk usbh1_clk = { | ||
297 | .pclk = &pll3_48m_clk, | ||
298 | .en_reg = PERIP1_CLK_ENB, | ||
299 | .en_reg_bit = USBH1_CLK_ENB, | ||
300 | .recalc = &follow_parent, | ||
301 | }; | ||
302 | |||
303 | /* usbd clock */ | ||
304 | static struct clk usbd_clk = { | ||
305 | .pclk = &pll3_48m_clk, | ||
306 | .en_reg = PERIP1_CLK_ENB, | ||
307 | .en_reg_bit = USBD_CLK_ENB, | ||
308 | .recalc = &follow_parent, | ||
309 | }; | ||
310 | |||
311 | /* clock derived from ahb clk */ | ||
312 | /* apb configuration structure */ | ||
313 | static struct bus_clk_config apb_config = { | ||
314 | .reg = CORE_CLK_CFG, | ||
315 | .mask = HCLK_PCLK_RATIO_MASK, | ||
316 | .shift = HCLK_PCLK_RATIO_SHIFT, | ||
317 | }; | ||
318 | |||
319 | /* apb clock */ | ||
320 | static struct clk apb_clk = { | ||
321 | .flags = ALWAYS_ENABLED, | ||
322 | .pclk = &ahb_clk, | ||
323 | .recalc = &bus_clk_recalc, | ||
324 | .private_data = &apb_config, | ||
325 | }; | ||
326 | |||
327 | /* i2c clock */ | ||
328 | static struct clk i2c_clk = { | ||
329 | .pclk = &ahb_clk, | ||
330 | .en_reg = PERIP1_CLK_ENB, | ||
331 | .en_reg_bit = I2C_CLK_ENB, | ||
332 | .recalc = &follow_parent, | ||
333 | }; | ||
334 | |||
335 | /* dma clock */ | ||
336 | static struct clk dma_clk = { | ||
337 | .pclk = &ahb_clk, | ||
338 | .en_reg = PERIP1_CLK_ENB, | ||
339 | .en_reg_bit = DMA_CLK_ENB, | ||
340 | .recalc = &follow_parent, | ||
341 | }; | ||
342 | |||
343 | /* jpeg clock */ | ||
344 | static struct clk jpeg_clk = { | ||
345 | .pclk = &ahb_clk, | ||
346 | .en_reg = PERIP1_CLK_ENB, | ||
347 | .en_reg_bit = JPEG_CLK_ENB, | ||
348 | .recalc = &follow_parent, | ||
349 | }; | ||
350 | |||
351 | /* gmac clock */ | ||
352 | static struct clk gmac_clk = { | ||
353 | .pclk = &ahb_clk, | ||
354 | .en_reg = PERIP1_CLK_ENB, | ||
355 | .en_reg_bit = GMAC_CLK_ENB, | ||
356 | .recalc = &follow_parent, | ||
357 | }; | ||
358 | |||
359 | /* smi clock */ | ||
360 | static struct clk smi_clk = { | ||
361 | .pclk = &ahb_clk, | ||
362 | .en_reg = PERIP1_CLK_ENB, | ||
363 | .en_reg_bit = SMI_CLK_ENB, | ||
364 | .recalc = &follow_parent, | ||
365 | }; | ||
366 | |||
367 | /* fsmc clock */ | ||
368 | static struct clk fsmc_clk = { | ||
369 | .pclk = &ahb_clk, | ||
370 | .en_reg = PERIP1_CLK_ENB, | ||
371 | .en_reg_bit = FSMC_CLK_ENB, | ||
372 | .recalc = &follow_parent, | ||
373 | }; | ||
374 | |||
375 | /* clock derived from apb clk */ | ||
376 | /* adc clock */ | ||
377 | static struct clk adc_clk = { | ||
378 | .pclk = &apb_clk, | ||
379 | .en_reg = PERIP1_CLK_ENB, | ||
380 | .en_reg_bit = ADC_CLK_ENB, | ||
381 | .recalc = &follow_parent, | ||
382 | }; | ||
383 | |||
384 | /* ssp0 clock */ | ||
385 | static struct clk ssp0_clk = { | ||
386 | .pclk = &apb_clk, | ||
387 | .en_reg = PERIP1_CLK_ENB, | ||
388 | .en_reg_bit = SSP0_CLK_ENB, | ||
389 | .recalc = &follow_parent, | ||
390 | }; | ||
391 | |||
392 | /* ssp1 clock */ | ||
393 | static struct clk ssp1_clk = { | ||
394 | .pclk = &apb_clk, | ||
395 | .en_reg = PERIP1_CLK_ENB, | ||
396 | .en_reg_bit = SSP1_CLK_ENB, | ||
397 | .recalc = &follow_parent, | ||
398 | }; | ||
399 | |||
400 | /* ssp2 clock */ | ||
401 | static struct clk ssp2_clk = { | ||
402 | .pclk = &apb_clk, | ||
403 | .en_reg = PERIP1_CLK_ENB, | ||
404 | .en_reg_bit = SSP2_CLK_ENB, | ||
405 | .recalc = &follow_parent, | ||
406 | }; | ||
407 | |||
408 | /* gpio0 ARM subsystem clock */ | ||
409 | static struct clk gpio0_clk = { | ||
410 | .flags = ALWAYS_ENABLED, | ||
411 | .pclk = &apb_clk, | ||
412 | .recalc = &follow_parent, | ||
413 | }; | ||
414 | |||
415 | /* gpio1 clock */ | ||
416 | static struct clk gpio1_clk = { | ||
417 | .pclk = &apb_clk, | ||
418 | .en_reg = PERIP1_CLK_ENB, | ||
419 | .en_reg_bit = GPIO1_CLK_ENB, | ||
420 | .recalc = &follow_parent, | ||
421 | }; | ||
422 | |||
423 | /* gpio2 clock */ | ||
424 | static struct clk gpio2_clk = { | ||
425 | .pclk = &apb_clk, | ||
426 | .en_reg = PERIP1_CLK_ENB, | ||
427 | .en_reg_bit = GPIO2_CLK_ENB, | ||
428 | .recalc = &follow_parent, | ||
429 | }; | ||
430 | |||
431 | /* array of all spear 6xx clock lookups */ | ||
432 | static struct clk_lookup spear_clk_lookups[] = { | ||
433 | /* root clks */ | ||
434 | { .con_id = "osc_32k_clk", .clk = &osc_32k_clk}, | ||
435 | { .con_id = "osc_30m_clk", .clk = &osc_30m_clk}, | ||
436 | /* clock derived from 32 KHz os clk */ | ||
437 | { .dev_id = "rtc", .clk = &rtc_clk}, | ||
438 | /* clock derived from 30 MHz os clk */ | ||
439 | { .con_id = "pll1_clk", .clk = &pll1_clk}, | ||
440 | { .con_id = "pll3_48m_clk", .clk = &pll3_48m_clk}, | ||
441 | { .dev_id = "wdt", .clk = &wdt_clk}, | ||
442 | /* clock derived from pll1 clk */ | ||
443 | { .con_id = "cpu_clk", .clk = &cpu_clk}, | ||
444 | { .con_id = "ahb_clk", .clk = &ahb_clk}, | ||
445 | { .dev_id = "uart0", .clk = &uart0_clk}, | ||
446 | { .dev_id = "uart1", .clk = &uart1_clk}, | ||
447 | { .dev_id = "firda", .clk = &firda_clk}, | ||
448 | { .dev_id = "clcd", .clk = &clcd_clk}, | ||
449 | { .dev_id = "gpt0", .clk = &gpt0_clk}, | ||
450 | { .dev_id = "gpt1", .clk = &gpt1_clk}, | ||
451 | { .dev_id = "gpt2", .clk = &gpt2_clk}, | ||
452 | { .dev_id = "gpt3", .clk = &gpt3_clk}, | ||
453 | /* clock derived from pll3 clk */ | ||
454 | { .dev_id = "usbh0", .clk = &usbh0_clk}, | ||
455 | { .dev_id = "usbh1", .clk = &usbh1_clk}, | ||
456 | { .dev_id = "usbd", .clk = &usbd_clk}, | ||
457 | /* clock derived from ahb clk */ | ||
458 | { .con_id = "apb_clk", .clk = &apb_clk}, | ||
459 | { .dev_id = "i2c", .clk = &i2c_clk}, | ||
460 | { .dev_id = "dma", .clk = &dma_clk}, | ||
461 | { .dev_id = "jpeg", .clk = &jpeg_clk}, | ||
462 | { .dev_id = "gmac", .clk = &gmac_clk}, | ||
463 | { .dev_id = "smi", .clk = &smi_clk}, | ||
464 | { .dev_id = "fsmc", .clk = &fsmc_clk}, | ||
465 | /* clock derived from apb clk */ | ||
466 | { .dev_id = "adc", .clk = &adc_clk}, | ||
467 | { .dev_id = "ssp0", .clk = &ssp0_clk}, | ||
468 | { .dev_id = "ssp1", .clk = &ssp1_clk}, | ||
469 | { .dev_id = "ssp2", .clk = &ssp2_clk}, | ||
470 | { .dev_id = "gpio0", .clk = &gpio0_clk}, | ||
471 | { .dev_id = "gpio1", .clk = &gpio1_clk}, | ||
472 | { .dev_id = "gpio2", .clk = &gpio2_clk}, | ||
473 | }; | ||
474 | |||
475 | void __init clk_init(void) | ||
476 | { | ||
477 | int i; | ||
478 | |||
479 | for (i = 0; i < ARRAY_SIZE(spear_clk_lookups); i++) | ||
480 | clk_register(&spear_clk_lookups[i]); | ||
481 | |||
482 | recalc_root_clocks(); | ||
483 | } | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/clkdev.h b/arch/arm/mach-spear6xx/include/mach/clkdev.h new file mode 100644 index 000000000000..05676bf440d3 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/clkdev.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/clkdev.h | ||
3 | * | ||
4 | * Clock Dev framework definitions for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_CLKDEV_H | ||
15 | #define __MACH_CLKDEV_H | ||
16 | |||
17 | #include <plat/clkdev.h> | ||
18 | |||
19 | #endif /* __MACH_CLKDEV_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/debug-macro.S b/arch/arm/mach-spear6xx/include/mach/debug-macro.S new file mode 100644 index 000000000000..0f3ea39edd96 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/debug-macro.S | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <plat/debug-macro.S> | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/entry-macro.S b/arch/arm/mach-spear6xx/include/mach/entry-macro.S new file mode 100644 index 000000000000..9eaecaeafcf0 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/entry-macro.S | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | #include <mach/spear.h> | ||
16 | #include <asm/hardware/vic.h> | ||
17 | |||
18 | .macro disable_fiq | ||
19 | .endm | ||
20 | |||
21 | .macro get_irqnr_preamble, base, tmp | ||
22 | .endm | ||
23 | |||
24 | .macro arch_ret_to_user, tmp1, tmp2 | ||
25 | .endm | ||
26 | |||
27 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
28 | ldr \base, =VA_SPEAR6XX_CPU_VIC_PRI_BASE | ||
29 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
30 | mov \irqnr, #0 | ||
31 | teq \irqstat, #0 | ||
32 | bne 1001f | ||
33 | ldr \base, =VA_SPEAR6XX_CPU_VIC_SEC_BASE | ||
34 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get status | ||
35 | teq \irqstat, #0 | ||
36 | beq 1002f @ this will set/reset | ||
37 | @ zero register | ||
38 | mov \irqnr, #32 | ||
39 | 1001: | ||
40 | /* | ||
41 | * Following code will find bit position of least significang | ||
42 | * bit set in irqstat, using following equation | ||
43 | * least significant bit set in n = (n & ~(n-1)) | ||
44 | */ | ||
45 | sub \tmp, \irqstat, #1 @ tmp = irqstat - 1 | ||
46 | mvn \tmp, \tmp @ tmp = ~tmp | ||
47 | and \irqstat, \irqstat, \tmp @ irqstat &= tmp | ||
48 | /* Now, irqstat is = bit no. of 1st bit set in vic irq status */ | ||
49 | clz \tmp, \irqstat @ tmp = leading zeros | ||
50 | |||
51 | rsb \tmp, \tmp, #0x1F @ tmp = 32 - tmp - 1 | ||
52 | add \irqnr, \irqnr, \tmp | ||
53 | |||
54 | 1002: /* EQ will be set if no irqs pending */ | ||
55 | .endm | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h new file mode 100644 index 000000000000..16205a538756 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/generic.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/generic.h | ||
3 | * | ||
4 | * SPEAr6XX machine family specific generic header file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_GENERIC_H | ||
15 | #define __MACH_GENERIC_H | ||
16 | |||
17 | #include <asm/mach/time.h> | ||
18 | #include <asm/mach/map.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/amba/bus.h> | ||
22 | |||
23 | /* | ||
24 | * Each GPT has 2 timer channels | ||
25 | * Following GPT channels will be used as clock source and clockevent | ||
26 | */ | ||
27 | #define SPEAR_GPT0_BASE SPEAR6XX_CPU_TMR_BASE | ||
28 | #define SPEAR_GPT0_CHAN0_IRQ IRQ_CPU_GPT1_1 | ||
29 | #define SPEAR_GPT0_CHAN1_IRQ IRQ_CPU_GPT1_2 | ||
30 | |||
31 | /* Add spear6xx family device structure declarations here */ | ||
32 | extern struct amba_device gpio_device[]; | ||
33 | extern struct amba_device uart_device[]; | ||
34 | extern struct sys_timer spear_sys_timer; | ||
35 | |||
36 | /* Add spear6xx family function declarations here */ | ||
37 | void __init spear6xx_map_io(void); | ||
38 | void __init spear6xx_init_irq(void); | ||
39 | void __init spear6xx_init(void); | ||
40 | void __init spear600_init(void); | ||
41 | void __init clk_init(void); | ||
42 | |||
43 | /* Add spear600 machine device structure declarations here */ | ||
44 | |||
45 | #endif /* __MACH_GENERIC_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/gpio.h b/arch/arm/mach-spear6xx/include/mach/gpio.h new file mode 100644 index 000000000000..3a789dbb69f7 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/gpio.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/gpio.h | ||
3 | * | ||
4 | * GPIO macros for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_GPIO_H | ||
15 | #define __MACH_GPIO_H | ||
16 | |||
17 | #include <plat/gpio.h> | ||
18 | |||
19 | #endif /* __MACH_GPIO_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/hardware.h b/arch/arm/mach-spear6xx/include/mach/hardware.h new file mode 100644 index 000000000000..7545116deca9 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/hardware.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/hardware.h | ||
3 | * | ||
4 | * Hardware definitions for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_HARDWARE_H | ||
15 | #define __MACH_HARDWARE_H | ||
16 | |||
17 | /* Vitual to physical translation of statically mapped space */ | ||
18 | #define IO_ADDRESS(x) (x | 0xF0000000) | ||
19 | |||
20 | #endif /* __MACH_HARDWARE_H */ | ||
21 | |||
diff --git a/arch/arm/mach-spear6xx/include/mach/io.h b/arch/arm/mach-spear6xx/include/mach/io.h new file mode 100644 index 000000000000..fb7c106cea94 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/io.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/io.h | ||
3 | * | ||
4 | * IO definitions for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_IO_H | ||
15 | #define __MACH_IO_H | ||
16 | |||
17 | #include <plat/io.h> | ||
18 | |||
19 | #endif /* __MACH_IO_H */ | ||
20 | |||
diff --git a/arch/arm/mach-spear6xx/include/mach/irqs.h b/arch/arm/mach-spear6xx/include/mach/irqs.h new file mode 100644 index 000000000000..8f214b03d75d --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/irqs.h | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/irqs.h | ||
3 | * | ||
4 | * IRQ helper macros for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_IRQS_H | ||
15 | #define __MACH_IRQS_H | ||
16 | |||
17 | /* IRQ definitions */ | ||
18 | /* VIC 1 */ | ||
19 | #define IRQ_INTRCOMM_SW_IRQ 0 | ||
20 | #define IRQ_INTRCOMM_CPU_1 1 | ||
21 | #define IRQ_INTRCOMM_CPU_2 2 | ||
22 | #define IRQ_INTRCOMM_RAS2A11_1 3 | ||
23 | #define IRQ_INTRCOMM_RAS2A11_2 4 | ||
24 | #define IRQ_INTRCOMM_RAS2A12_1 5 | ||
25 | #define IRQ_INTRCOMM_RAS2A12_2 6 | ||
26 | #define IRQ_GEN_RAS_0 7 | ||
27 | #define IRQ_GEN_RAS_1 8 | ||
28 | #define IRQ_GEN_RAS_2 9 | ||
29 | #define IRQ_GEN_RAS_3 10 | ||
30 | #define IRQ_GEN_RAS_4 11 | ||
31 | #define IRQ_GEN_RAS_5 12 | ||
32 | #define IRQ_GEN_RAS_6 13 | ||
33 | #define IRQ_GEN_RAS_7 14 | ||
34 | #define IRQ_GEN_RAS_8 15 | ||
35 | #define IRQ_CPU_GPT1_1 16 | ||
36 | #define IRQ_CPU_GPT1_2 17 | ||
37 | #define IRQ_LOCAL_GPIO 18 | ||
38 | #define IRQ_PLL_UNLOCK 19 | ||
39 | #define IRQ_JPEG 20 | ||
40 | #define IRQ_FSMC 21 | ||
41 | #define IRQ_IRDA 22 | ||
42 | #define IRQ_RESERVED 23 | ||
43 | #define IRQ_UART_0 24 | ||
44 | #define IRQ_UART_1 25 | ||
45 | #define IRQ_SSP_1 26 | ||
46 | #define IRQ_SSP_2 27 | ||
47 | #define IRQ_I2C 28 | ||
48 | #define IRQ_GEN_RAS_9 29 | ||
49 | #define IRQ_GEN_RAS_10 30 | ||
50 | #define IRQ_GEN_RAS_11 31 | ||
51 | |||
52 | /* VIC 2 */ | ||
53 | #define IRQ_APPL_GPT1_1 32 | ||
54 | #define IRQ_APPL_GPT1_2 33 | ||
55 | #define IRQ_APPL_GPT2_1 34 | ||
56 | #define IRQ_APPL_GPT2_2 35 | ||
57 | #define IRQ_APPL_GPIO 36 | ||
58 | #define IRQ_APPL_SSP 37 | ||
59 | #define IRQ_APPL_ADC 38 | ||
60 | #define IRQ_APPL_RESERVED 39 | ||
61 | #define IRQ_AHB_EXP_MASTER 40 | ||
62 | #define IRQ_DDR_CONTROLLER 41 | ||
63 | #define IRQ_BASIC_DMA 42 | ||
64 | #define IRQ_BASIC_RESERVED1 43 | ||
65 | #define IRQ_BASIC_SMI 44 | ||
66 | #define IRQ_BASIC_CLCD 45 | ||
67 | #define IRQ_EXP_AHB_1 46 | ||
68 | #define IRQ_EXP_AHB_2 47 | ||
69 | #define IRQ_BASIC_GPT1_1 48 | ||
70 | #define IRQ_BASIC_GPT1_2 49 | ||
71 | #define IRQ_BASIC_RTC 50 | ||
72 | #define IRQ_BASIC_GPIO 51 | ||
73 | #define IRQ_BASIC_WDT 52 | ||
74 | #define IRQ_BASIC_RESERVED 53 | ||
75 | #define IRQ_AHB_EXP_SLAVE 54 | ||
76 | #define IRQ_GMAC_1 55 | ||
77 | #define IRQ_GMAC_2 56 | ||
78 | #define IRQ_USB_DEV 57 | ||
79 | #define IRQ_USB_H_OHCI_0 58 | ||
80 | #define IRQ_USB_H_EHCI_0 59 | ||
81 | #define IRQ_USB_H_OHCI_1 60 | ||
82 | #define IRQ_USB_H_EHCI_1 61 | ||
83 | #define IRQ_EXP_AHB_3 62 | ||
84 | #define IRQ_EXP_AHB_4 63 | ||
85 | |||
86 | #define IRQ_VIC_END 64 | ||
87 | |||
88 | /* GPIO pins virtual irqs */ | ||
89 | #define SPEAR_GPIO_INT_BASE IRQ_VIC_END | ||
90 | #define SPEAR_GPIO0_INT_BASE SPEAR_GPIO_INT_BASE | ||
91 | #define SPEAR_GPIO1_INT_BASE (SPEAR_GPIO0_INT_BASE + 8) | ||
92 | #define SPEAR_GPIO2_INT_BASE (SPEAR_GPIO1_INT_BASE + 8) | ||
93 | #define SPEAR_GPIO_INT_END (SPEAR_GPIO2_INT_BASE + 8) | ||
94 | #define VIRTUAL_IRQS (SPEAR_GPIO_INT_END - IRQ_VIC_END) | ||
95 | #define NR_IRQS (IRQ_VIC_END + VIRTUAL_IRQS) | ||
96 | |||
97 | #endif /* __MACH_IRQS_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/memory.h b/arch/arm/mach-spear6xx/include/mach/memory.h new file mode 100644 index 000000000000..781f088fc228 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/memory.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/memory.h | ||
3 | * | ||
4 | * Memory map for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_MEMORY_H | ||
15 | #define __MACH_MEMORY_H | ||
16 | |||
17 | #include <plat/memory.h> | ||
18 | |||
19 | #endif /* __MACH_MEMORY_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/misc_regs.h b/arch/arm/mach-spear6xx/include/mach/misc_regs.h new file mode 100644 index 000000000000..03908036b0d0 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/misc_regs.h | |||
@@ -0,0 +1,173 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/misc_regs.h | ||
3 | * | ||
4 | * Miscellaneous registers definitions for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_MISC_REGS_H | ||
15 | #define __MACH_MISC_REGS_H | ||
16 | |||
17 | #include <mach/spear.h> | ||
18 | |||
19 | #define MISC_BASE VA_SPEAR6XX_ICM3_MISC_REG_BASE | ||
20 | |||
21 | #define SOC_CFG_CTR ((unsigned int *)(MISC_BASE + 0x000)) | ||
22 | #define DIAG_CFG_CTR ((unsigned int *)(MISC_BASE + 0x004)) | ||
23 | #define PLL1_CTR ((unsigned int *)(MISC_BASE + 0x008)) | ||
24 | #define PLL1_FRQ ((unsigned int *)(MISC_BASE + 0x00C)) | ||
25 | #define PLL1_MOD ((unsigned int *)(MISC_BASE + 0x010)) | ||
26 | #define PLL2_CTR ((unsigned int *)(MISC_BASE + 0x014)) | ||
27 | /* PLL_CTR register masks */ | ||
28 | #define PLL_ENABLE 2 | ||
29 | #define PLL_MODE_SHIFT 4 | ||
30 | #define PLL_MODE_MASK 0x3 | ||
31 | #define PLL_MODE_NORMAL 0 | ||
32 | #define PLL_MODE_FRACTION 1 | ||
33 | #define PLL_MODE_DITH_DSB 2 | ||
34 | #define PLL_MODE_DITH_SSB 3 | ||
35 | |||
36 | #define PLL2_FRQ ((unsigned int *)(MISC_BASE + 0x018)) | ||
37 | /* PLL FRQ register masks */ | ||
38 | #define PLL_DIV_N_SHIFT 0 | ||
39 | #define PLL_DIV_N_MASK 0xFF | ||
40 | #define PLL_DIV_P_SHIFT 8 | ||
41 | #define PLL_DIV_P_MASK 0x7 | ||
42 | #define PLL_NORM_FDBK_M_SHIFT 24 | ||
43 | #define PLL_NORM_FDBK_M_MASK 0xFF | ||
44 | #define PLL_DITH_FDBK_M_SHIFT 16 | ||
45 | #define PLL_DITH_FDBK_M_MASK 0xFFFF | ||
46 | |||
47 | #define PLL2_MOD ((unsigned int *)(MISC_BASE + 0x01C)) | ||
48 | #define PLL_CLK_CFG ((unsigned int *)(MISC_BASE + 0x020)) | ||
49 | #define CORE_CLK_CFG ((unsigned int *)(MISC_BASE + 0x024)) | ||
50 | /* CORE CLK CFG register masks */ | ||
51 | #define PLL_HCLK_RATIO_SHIFT 10 | ||
52 | #define PLL_HCLK_RATIO_MASK 0x3 | ||
53 | #define HCLK_PCLK_RATIO_SHIFT 8 | ||
54 | #define HCLK_PCLK_RATIO_MASK 0x3 | ||
55 | |||
56 | #define PERIP_CLK_CFG ((unsigned int *)(MISC_BASE + 0x028)) | ||
57 | /* PERIP_CLK_CFG register masks */ | ||
58 | #define CLCD_CLK_SHIFT 2 | ||
59 | #define CLCD_CLK_MASK 0x3 | ||
60 | #define UART_CLK_SHIFT 4 | ||
61 | #define UART_CLK_MASK 0x1 | ||
62 | #define FIRDA_CLK_SHIFT 5 | ||
63 | #define FIRDA_CLK_MASK 0x3 | ||
64 | #define GPT0_CLK_SHIFT 8 | ||
65 | #define GPT1_CLK_SHIFT 10 | ||
66 | #define GPT2_CLK_SHIFT 11 | ||
67 | #define GPT3_CLK_SHIFT 12 | ||
68 | #define GPT_CLK_MASK 0x1 | ||
69 | #define AUX_CLK_PLL3_MASK 0 | ||
70 | #define AUX_CLK_PLL1_MASK 1 | ||
71 | |||
72 | #define PERIP1_CLK_ENB ((unsigned int *)(MISC_BASE + 0x02C)) | ||
73 | /* PERIP1_CLK_ENB register masks */ | ||
74 | #define UART0_CLK_ENB 3 | ||
75 | #define UART1_CLK_ENB 4 | ||
76 | #define SSP0_CLK_ENB 5 | ||
77 | #define SSP1_CLK_ENB 6 | ||
78 | #define I2C_CLK_ENB 7 | ||
79 | #define JPEG_CLK_ENB 8 | ||
80 | #define FSMC_CLK_ENB 9 | ||
81 | #define FIRDA_CLK_ENB 10 | ||
82 | #define GPT2_CLK_ENB 11 | ||
83 | #define GPT3_CLK_ENB 12 | ||
84 | #define GPIO2_CLK_ENB 13 | ||
85 | #define SSP2_CLK_ENB 14 | ||
86 | #define ADC_CLK_ENB 15 | ||
87 | #define GPT1_CLK_ENB 11 | ||
88 | #define RTC_CLK_ENB 17 | ||
89 | #define GPIO1_CLK_ENB 18 | ||
90 | #define DMA_CLK_ENB 19 | ||
91 | #define SMI_CLK_ENB 21 | ||
92 | #define CLCD_CLK_ENB 22 | ||
93 | #define GMAC_CLK_ENB 23 | ||
94 | #define USBD_CLK_ENB 24 | ||
95 | #define USBH0_CLK_ENB 25 | ||
96 | #define USBH1_CLK_ENB 26 | ||
97 | |||
98 | #define SOC_CORE_ID ((unsigned int *)(MISC_BASE + 0x030)) | ||
99 | #define RAS_CLK_ENB ((unsigned int *)(MISC_BASE + 0x034)) | ||
100 | #define PERIP1_SOF_RST ((unsigned int *)(MISC_BASE + 0x038)) | ||
101 | /* PERIP1_SOF_RST register masks */ | ||
102 | #define JPEG_SOF_RST 8 | ||
103 | |||
104 | #define SOC_USER_ID ((unsigned int *)(MISC_BASE + 0x03C)) | ||
105 | #define RAS_SOF_RST ((unsigned int *)(MISC_BASE + 0x040)) | ||
106 | #define PRSC1_CLK_CFG ((unsigned int *)(MISC_BASE + 0x044)) | ||
107 | #define PRSC2_CLK_CFG ((unsigned int *)(MISC_BASE + 0x048)) | ||
108 | #define PRSC3_CLK_CFG ((unsigned int *)(MISC_BASE + 0x04C)) | ||
109 | /* gpt synthesizer register masks */ | ||
110 | #define GPT_MSCALE_SHIFT 0 | ||
111 | #define GPT_MSCALE_MASK 0xFFF | ||
112 | #define GPT_NSCALE_SHIFT 12 | ||
113 | #define GPT_NSCALE_MASK 0xF | ||
114 | |||
115 | #define AMEM_CLK_CFG ((unsigned int *)(MISC_BASE + 0x050)) | ||
116 | #define EXPI_CLK_CFG ((unsigned int *)(MISC_BASE + 0x054)) | ||
117 | #define CLCD_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x05C)) | ||
118 | #define FIRDA_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x060)) | ||
119 | #define UART_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x064)) | ||
120 | #define GMAC_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x068)) | ||
121 | #define RAS1_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x06C)) | ||
122 | #define RAS2_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x070)) | ||
123 | #define RAS3_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x074)) | ||
124 | #define RAS4_CLK_SYNT ((unsigned int *)(MISC_BASE + 0x078)) | ||
125 | /* aux clk synthesiser register masks for irda to ras4 */ | ||
126 | #define AUX_EQ_SEL_SHIFT 30 | ||
127 | #define AUX_EQ_SEL_MASK 1 | ||
128 | #define AUX_EQ1_SEL 0 | ||
129 | #define AUX_EQ2_SEL 1 | ||
130 | #define AUX_XSCALE_SHIFT 16 | ||
131 | #define AUX_XSCALE_MASK 0xFFF | ||
132 | #define AUX_YSCALE_SHIFT 0 | ||
133 | #define AUX_YSCALE_MASK 0xFFF | ||
134 | |||
135 | #define ICM1_ARB_CFG ((unsigned int *)(MISC_BASE + 0x07C)) | ||
136 | #define ICM2_ARB_CFG ((unsigned int *)(MISC_BASE + 0x080)) | ||
137 | #define ICM3_ARB_CFG ((unsigned int *)(MISC_BASE + 0x084)) | ||
138 | #define ICM4_ARB_CFG ((unsigned int *)(MISC_BASE + 0x088)) | ||
139 | #define ICM5_ARB_CFG ((unsigned int *)(MISC_BASE + 0x08C)) | ||
140 | #define ICM6_ARB_CFG ((unsigned int *)(MISC_BASE + 0x090)) | ||
141 | #define ICM7_ARB_CFG ((unsigned int *)(MISC_BASE + 0x094)) | ||
142 | #define ICM8_ARB_CFG ((unsigned int *)(MISC_BASE + 0x098)) | ||
143 | #define ICM9_ARB_CFG ((unsigned int *)(MISC_BASE + 0x09C)) | ||
144 | #define DMA_CHN_CFG ((unsigned int *)(MISC_BASE + 0x0A0)) | ||
145 | #define USB2_PHY_CFG ((unsigned int *)(MISC_BASE + 0x0A4)) | ||
146 | #define GMAC_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0A8)) | ||
147 | #define EXPI_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0AC)) | ||
148 | #define PRC1_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0C0)) | ||
149 | #define PRC2_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0C4)) | ||
150 | #define PRC3_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0C8)) | ||
151 | #define PRC4_LOCK_CTR ((unsigned int *)(MISC_BASE + 0x0CC)) | ||
152 | #define PRC1_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0D0)) | ||
153 | #define PRC2_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0D4)) | ||
154 | #define PRC3_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0D8)) | ||
155 | #define PRC4_IRQ_CTR ((unsigned int *)(MISC_BASE + 0x0DC)) | ||
156 | #define PWRDOWN_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0E0)) | ||
157 | #define COMPSSTL_1V8_CFG ((unsigned int *)(MISC_BASE + 0x0E4)) | ||
158 | #define COMPSSTL_2V5_CFG ((unsigned int *)(MISC_BASE + 0x0E8)) | ||
159 | #define COMPCOR_3V3_CFG ((unsigned int *)(MISC_BASE + 0x0EC)) | ||
160 | #define SSTLPAD_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0F0)) | ||
161 | #define BIST1_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0F4)) | ||
162 | #define BIST2_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0F8)) | ||
163 | #define BIST3_CFG_CTR ((unsigned int *)(MISC_BASE + 0x0FC)) | ||
164 | #define BIST4_CFG_CTR ((unsigned int *)(MISC_BASE + 0x100)) | ||
165 | #define BIST5_CFG_CTR ((unsigned int *)(MISC_BASE + 0x104)) | ||
166 | #define BIST1_STS_RES ((unsigned int *)(MISC_BASE + 0x108)) | ||
167 | #define BIST2_STS_RES ((unsigned int *)(MISC_BASE + 0x10C)) | ||
168 | #define BIST3_STS_RES ((unsigned int *)(MISC_BASE + 0x110)) | ||
169 | #define BIST4_STS_RES ((unsigned int *)(MISC_BASE + 0x114)) | ||
170 | #define BIST5_STS_RES ((unsigned int *)(MISC_BASE + 0x118)) | ||
171 | #define SYSERR_CFG_CTR ((unsigned int *)(MISC_BASE + 0x11C)) | ||
172 | |||
173 | #endif /* __MACH_MISC_REGS_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/spear.h b/arch/arm/mach-spear6xx/include/mach/spear.h new file mode 100644 index 000000000000..a835f5b6b182 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/spear.h | |||
@@ -0,0 +1,173 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/spear.h | ||
3 | * | ||
4 | * SPEAr6xx Machine family specific definition | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_SPEAR6XX_H | ||
15 | #define __MACH_SPEAR6XX_H | ||
16 | |||
17 | #include <mach/hardware.h> | ||
18 | #include <mach/spear600.h> | ||
19 | |||
20 | #define SPEAR6XX_ML_SDRAM_BASE 0x00000000 | ||
21 | #define SPEAR6XX_ML_SDRAM_SIZE 0x40000000 | ||
22 | |||
23 | /* ICM1 - Low speed connection */ | ||
24 | #define SPEAR6XX_ICM1_BASE 0xD0000000 | ||
25 | #define SPEAR6XX_ICM1_SIZE 0x08000000 | ||
26 | |||
27 | #define SPEAR6XX_ICM1_UART0_BASE 0xD0000000 | ||
28 | #define VA_SPEAR6XX_ICM1_UART0_BASE IO_ADDRESS(SPEAR6XX_ICM1_UART0_BASE) | ||
29 | #define SPEAR6XX_ICM1_UART0_SIZE 0x00080000 | ||
30 | |||
31 | #define SPEAR6XX_ICM1_UART1_BASE 0xD0080000 | ||
32 | #define SPEAR6XX_ICM1_UART1_SIZE 0x00080000 | ||
33 | |||
34 | #define SPEAR6XX_ICM1_SSP0_BASE 0xD0100000 | ||
35 | #define SPEAR6XX_ICM1_SSP0_SIZE 0x00080000 | ||
36 | |||
37 | #define SPEAR6XX_ICM1_SSP1_BASE 0xD0180000 | ||
38 | #define SPEAR6XX_ICM1_SSP1_SIZE 0x00080000 | ||
39 | |||
40 | #define SPEAR6XX_ICM1_I2C_BASE 0xD0200000 | ||
41 | #define SPEAR6XX_ICM1_I2C_SIZE 0x00080000 | ||
42 | |||
43 | #define SPEAR6XX_ICM1_JPEG_BASE 0xD0800000 | ||
44 | #define SPEAR6XX_ICM1_JPEG_SIZE 0x00800000 | ||
45 | |||
46 | #define SPEAR6XX_ICM1_IRDA_BASE 0xD1000000 | ||
47 | #define SPEAR6XX_ICM1_IRDA_SIZE 0x00800000 | ||
48 | |||
49 | #define SPEAR6XX_ICM1_FSMC_BASE 0xD1800000 | ||
50 | #define SPEAR6XX_ICM1_FSMC_SIZE 0x00800000 | ||
51 | |||
52 | #define SPEAR6XX_ICM1_NAND_BASE 0xD2000000 | ||
53 | #define SPEAR6XX_ICM1_NAND_SIZE 0x00800000 | ||
54 | |||
55 | #define SPEAR6XX_ICM1_SRAM_BASE 0xD2800000 | ||
56 | #define SPEAR6XX_ICM1_SRAM_SIZE 0x00800000 | ||
57 | |||
58 | /* ICM2 - Application Subsystem */ | ||
59 | #define SPEAR6XX_ICM2_BASE 0xD8000000 | ||
60 | #define SPEAR6XX_ICM2_SIZE 0x08000000 | ||
61 | |||
62 | #define SPEAR6XX_ICM2_TMR0_BASE 0xD8000000 | ||
63 | #define SPEAR6XX_ICM2_TMR0_SIZE 0x00080000 | ||
64 | |||
65 | #define SPEAR6XX_ICM2_TMR1_BASE 0xD8080000 | ||
66 | #define SPEAR6XX_ICM2_TMR1_SIZE 0x00080000 | ||
67 | |||
68 | #define SPEAR6XX_ICM2_GPIO_BASE 0xD8100000 | ||
69 | #define SPEAR6XX_ICM2_GPIO_SIZE 0x00080000 | ||
70 | |||
71 | #define SPEAR6XX_ICM2_SPI2_BASE 0xD8180000 | ||
72 | #define SPEAR6XX_ICM2_SPI2_SIZE 0x00080000 | ||
73 | |||
74 | #define SPEAR6XX_ICM2_ADC_BASE 0xD8200000 | ||
75 | #define SPEAR6XX_ICM2_ADC_SIZE 0x00080000 | ||
76 | |||
77 | /* ML-1, 2 - Multi Layer CPU Subsystem */ | ||
78 | #define SPEAR6XX_ML_CPU_BASE 0xF0000000 | ||
79 | #define SPEAR6XX_ML_CPU_SIZE 0x08000000 | ||
80 | |||
81 | #define SPEAR6XX_CPU_TMR_BASE 0xF0000000 | ||
82 | #define SPEAR6XX_CPU_TMR_SIZE 0x00100000 | ||
83 | |||
84 | #define SPEAR6XX_CPU_GPIO_BASE 0xF0100000 | ||
85 | #define SPEAR6XX_CPU_GPIO_SIZE 0x00100000 | ||
86 | |||
87 | #define SPEAR6XX_CPU_VIC_SEC_BASE 0xF1000000 | ||
88 | #define VA_SPEAR6XX_CPU_VIC_SEC_BASE IO_ADDRESS(SPEAR6XX_CPU_VIC_SEC_BASE) | ||
89 | #define SPEAR6XX_CPU_VIC_SEC_SIZE 0x00100000 | ||
90 | |||
91 | #define SPEAR6XX_CPU_VIC_PRI_BASE 0xF1100000 | ||
92 | #define VA_SPEAR6XX_CPU_VIC_PRI_BASE IO_ADDRESS(SPEAR6XX_CPU_VIC_PRI_BASE) | ||
93 | #define SPEAR6XX_CPU_VIC_PRI_SIZE 0x00100000 | ||
94 | |||
95 | /* ICM3 - Basic Subsystem */ | ||
96 | #define SPEAR6XX_ICM3_BASE 0xF8000000 | ||
97 | #define SPEAR6XX_ICM3_SIZE 0x08000000 | ||
98 | |||
99 | #define SPEAR6XX_ICM3_SMEM_BASE 0xF8000000 | ||
100 | #define SPEAR6XX_ICM3_SMEM_SIZE 0x04000000 | ||
101 | |||
102 | #define SPEAR6XX_ICM3_SMI_CTRL_BASE 0xFC000000 | ||
103 | #define SPEAR6XX_ICM3_SMI_CTRL_SIZE 0x00200000 | ||
104 | |||
105 | #define SPEAR6XX_ICM3_CLCD_BASE 0xFC200000 | ||
106 | #define SPEAR6XX_ICM3_CLCD_SIZE 0x00200000 | ||
107 | |||
108 | #define SPEAR6XX_ICM3_DMA_BASE 0xFC400000 | ||
109 | #define SPEAR6XX_ICM3_DMA_SIZE 0x00200000 | ||
110 | |||
111 | #define SPEAR6XX_ICM3_SDRAM_CTRL_BASE 0xFC600000 | ||
112 | #define SPEAR6XX_ICM3_SDRAM_CTRL_SIZE 0x00200000 | ||
113 | |||
114 | #define SPEAR6XX_ICM3_TMR_BASE 0xFC800000 | ||
115 | #define SPEAR6XX_ICM3_TMR_SIZE 0x00080000 | ||
116 | |||
117 | #define SPEAR6XX_ICM3_WDT_BASE 0xFC880000 | ||
118 | #define SPEAR6XX_ICM3_WDT_SIZE 0x00080000 | ||
119 | |||
120 | #define SPEAR6XX_ICM3_RTC_BASE 0xFC900000 | ||
121 | #define SPEAR6XX_ICM3_RTC_SIZE 0x00080000 | ||
122 | |||
123 | #define SPEAR6XX_ICM3_GPIO_BASE 0xFC980000 | ||
124 | #define SPEAR6XX_ICM3_GPIO_SIZE 0x00080000 | ||
125 | |||
126 | #define SPEAR6XX_ICM3_SYS_CTRL_BASE 0xFCA00000 | ||
127 | #define VA_SPEAR6XX_ICM3_SYS_CTRL_BASE IO_ADDRESS(SPEAR6XX_ICM3_SYS_CTRL_BASE) | ||
128 | #define SPEAR6XX_ICM3_SYS_CTRL_SIZE 0x00080000 | ||
129 | |||
130 | #define SPEAR6XX_ICM3_MISC_REG_BASE 0xFCA80000 | ||
131 | #define VA_SPEAR6XX_ICM3_MISC_REG_BASE IO_ADDRESS(SPEAR6XX_ICM3_MISC_REG_BASE) | ||
132 | #define SPEAR6XX_ICM3_MISC_REG_SIZE 0x00080000 | ||
133 | |||
134 | /* ICM4 - High Speed Connection */ | ||
135 | #define SPEAR6XX_ICM4_BASE 0xE0000000 | ||
136 | #define SPEAR6XX_ICM4_SIZE 0x08000000 | ||
137 | |||
138 | #define SPEAR6XX_ICM4_GMAC_BASE 0xE0800000 | ||
139 | #define SPEAR6XX_ICM4_GMAC_SIZE 0x00800000 | ||
140 | |||
141 | #define SPEAR6XX_ICM4_USBD_FIFO_BASE 0xE1000000 | ||
142 | #define SPEAR6XX_ICM4_USBD_FIFO_SIZE 0x00100000 | ||
143 | |||
144 | #define SPEAR6XX_ICM4_USBD_CSR_BASE 0xE1100000 | ||
145 | #define SPEAR6XX_ICM4_USBD_CSR_SIZE 0x00100000 | ||
146 | |||
147 | #define SPEAR6XX_ICM4_USBD_PLDT_BASE 0xE1200000 | ||
148 | #define SPEAR6XX_ICM4_USBD_PLDT_SIZE 0x00100000 | ||
149 | |||
150 | #define SPEAR6XX_ICM4_USB_EHCI0_BASE 0xE1800000 | ||
151 | #define SPEAR6XX_ICM4_USB_EHCI0_SIZE 0x00100000 | ||
152 | |||
153 | #define SPEAR6XX_ICM4_USB_OHCI0_BASE 0xE1900000 | ||
154 | #define SPEAR6XX_ICM4_USB_OHCI0_SIZE 0x00100000 | ||
155 | |||
156 | #define SPEAR6XX_ICM4_USB_EHCI1_BASE 0xE2000000 | ||
157 | #define SPEAR6XX_ICM4_USB_EHCI1_SIZE 0x00100000 | ||
158 | |||
159 | #define SPEAR6XX_ICM4_USB_OHCI1_BASE 0xE2100000 | ||
160 | #define SPEAR6XX_ICM4_USB_OHCI1_SIZE 0x00100000 | ||
161 | |||
162 | #define SPEAR6XX_ICM4_USB_ARB_BASE 0xE2800000 | ||
163 | #define SPEAR6XX_ICM4_USB_ARB_SIZE 0x00010000 | ||
164 | |||
165 | /* Debug uart for linux, will be used for debug and uncompress messages */ | ||
166 | #define SPEAR_DBG_UART_BASE SPEAR6XX_ICM1_UART0_BASE | ||
167 | #define VA_SPEAR_DBG_UART_BASE VA_SPEAR6XX_ICM1_UART0_BASE | ||
168 | |||
169 | /* Sysctl base for spear platform */ | ||
170 | #define SPEAR_SYS_CTRL_BASE SPEAR6XX_ICM3_SYS_CTRL_BASE | ||
171 | #define VA_SPEAR_SYS_CTRL_BASE VA_SPEAR6XX_ICM3_SYS_CTRL_BASE | ||
172 | |||
173 | #endif /* __MACH_SPEAR6XX_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/spear600.h b/arch/arm/mach-spear6xx/include/mach/spear600.h new file mode 100644 index 000000000000..c068cc50b0fb --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/spear600.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear66xx/include/mach/spear600.h | ||
3 | * | ||
4 | * SPEAr600 Machine specific definition | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifdef CONFIG_MACH_SPEAR600 | ||
15 | |||
16 | #ifndef __MACH_SPEAR600_H | ||
17 | #define __MACH_SPEAR600_H | ||
18 | |||
19 | #endif /* __MACH_SPEAR600_H */ | ||
20 | |||
21 | #endif /* CONFIG_MACH_SPEAR600 */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/system.h b/arch/arm/mach-spear6xx/include/mach/system.h new file mode 100644 index 000000000000..0b1d2be81cfb --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/system.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/system.h | ||
3 | * | ||
4 | * SPEAr6xx Machine family specific architecture functions | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_SYSTEM_H | ||
15 | #define __MACH_SYSTEM_H | ||
16 | |||
17 | #include <plat/system.h> | ||
18 | |||
19 | #endif /* __MACH_SYSTEM_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/timex.h b/arch/arm/mach-spear6xx/include/mach/timex.h new file mode 100644 index 000000000000..ac1c5b005695 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/timex.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/timex.h | ||
3 | * | ||
4 | * SPEAr6XX machine family specific timex definitions | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_TIMEX_H | ||
15 | #define __MACH_TIMEX_H | ||
16 | |||
17 | #include <plat/timex.h> | ||
18 | |||
19 | #endif /* __MACH_TIMEX_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/uncompress.h b/arch/arm/mach-spear6xx/include/mach/uncompress.h new file mode 100644 index 000000000000..77f0765e21e1 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/uncompress.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/uncompress.h | ||
3 | * | ||
4 | * Serial port stubs for kernel decompress status messages | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_UNCOMPRESS_H | ||
15 | #define __MACH_UNCOMPRESS_H | ||
16 | |||
17 | #include <plat/uncompress.h> | ||
18 | |||
19 | #endif /* __MACH_UNCOMPRESS_H */ | ||
diff --git a/arch/arm/mach-spear6xx/include/mach/vmalloc.h b/arch/arm/mach-spear6xx/include/mach/vmalloc.h new file mode 100644 index 000000000000..4a0b56cb2a91 --- /dev/null +++ b/arch/arm/mach-spear6xx/include/mach/vmalloc.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Defining Vmalloc area for SPEAr6xx machine family | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __MACH_VMALLOC_H | ||
15 | #define __MACH_VMALLOC_H | ||
16 | |||
17 | #include <plat/vmalloc.h> | ||
18 | |||
19 | #endif /* __MACH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-spear6xx/spear600.c b/arch/arm/mach-spear6xx/spear600.c new file mode 100644 index 000000000000..5c484c433dc1 --- /dev/null +++ b/arch/arm/mach-spear6xx/spear600.c | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/spear600.c | ||
3 | * | ||
4 | * SPEAr600 machine source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/ptrace.h> | ||
15 | #include <asm/irq.h> | ||
16 | #include <mach/generic.h> | ||
17 | #include <mach/spear.h> | ||
18 | |||
19 | /* Add spear600 specific devices here */ | ||
20 | |||
21 | void __init spear600_init(void) | ||
22 | { | ||
23 | /* call spear6xx family common init function */ | ||
24 | spear6xx_init(); | ||
25 | } | ||
diff --git a/arch/arm/mach-spear6xx/spear600_evb.c b/arch/arm/mach-spear6xx/spear600_evb.c new file mode 100644 index 000000000000..daff8d04f7b6 --- /dev/null +++ b/arch/arm/mach-spear6xx/spear600_evb.c | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/spear600_evb.c | ||
3 | * | ||
4 | * SPEAr600 evaluation board source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <asm/mach/arch.h> | ||
15 | #include <asm/mach-types.h> | ||
16 | #include <mach/generic.h> | ||
17 | #include <mach/spear.h> | ||
18 | |||
19 | static struct amba_device *amba_devs[] __initdata = { | ||
20 | &gpio_device[0], | ||
21 | &gpio_device[1], | ||
22 | &gpio_device[2], | ||
23 | &uart_device[0], | ||
24 | &uart_device[1], | ||
25 | }; | ||
26 | |||
27 | static struct platform_device *plat_devs[] __initdata = { | ||
28 | }; | ||
29 | |||
30 | static void __init spear600_evb_init(void) | ||
31 | { | ||
32 | unsigned int i; | ||
33 | |||
34 | /* call spear600 machine init function */ | ||
35 | spear600_init(); | ||
36 | |||
37 | /* Add Platform Devices */ | ||
38 | platform_add_devices(plat_devs, ARRAY_SIZE(plat_devs)); | ||
39 | |||
40 | /* Add Amba Devices */ | ||
41 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) | ||
42 | amba_device_register(amba_devs[i], &iomem_resource); | ||
43 | } | ||
44 | |||
45 | MACHINE_START(SPEAR600, "ST-SPEAR600-EVB") | ||
46 | .boot_params = 0x00000100, | ||
47 | .map_io = spear6xx_map_io, | ||
48 | .init_irq = spear6xx_init_irq, | ||
49 | .timer = &spear_sys_timer, | ||
50 | .init_machine = spear600_evb_init, | ||
51 | MACHINE_END | ||
diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c new file mode 100644 index 000000000000..b67e571d4bf7 --- /dev/null +++ b/arch/arm/mach-spear6xx/spear6xx.c | |||
@@ -0,0 +1,158 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-spear6xx/spear6xx.c | ||
3 | * | ||
4 | * SPEAr6XX machines common source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Rajeev Kumar<rajeev-dlh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/types.h> | ||
15 | #include <linux/amba/pl061.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/ptrace.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <asm/hardware/vic.h> | ||
20 | #include <asm/irq.h> | ||
21 | #include <asm/mach/arch.h> | ||
22 | #include <mach/irqs.h> | ||
23 | #include <mach/generic.h> | ||
24 | #include <mach/spear.h> | ||
25 | |||
26 | /* Add spear6xx machines common devices here */ | ||
27 | /* uart device registeration */ | ||
28 | struct amba_device uart_device[] = { | ||
29 | { | ||
30 | .dev = { | ||
31 | .init_name = "uart0", | ||
32 | }, | ||
33 | .res = { | ||
34 | .start = SPEAR6XX_ICM1_UART0_BASE, | ||
35 | .end = SPEAR6XX_ICM1_UART0_BASE + | ||
36 | SPEAR6XX_ICM1_UART0_SIZE - 1, | ||
37 | .flags = IORESOURCE_MEM, | ||
38 | }, | ||
39 | .irq = {IRQ_UART_0, NO_IRQ}, | ||
40 | }, { | ||
41 | .dev = { | ||
42 | .init_name = "uart1", | ||
43 | }, | ||
44 | .res = { | ||
45 | .start = SPEAR6XX_ICM1_UART1_BASE, | ||
46 | .end = SPEAR6XX_ICM1_UART1_BASE + | ||
47 | SPEAR6XX_ICM1_UART1_SIZE - 1, | ||
48 | .flags = IORESOURCE_MEM, | ||
49 | }, | ||
50 | .irq = {IRQ_UART_1, NO_IRQ}, | ||
51 | } | ||
52 | }; | ||
53 | |||
54 | /* gpio device registeration */ | ||
55 | static struct pl061_platform_data gpio_plat_data[] = { | ||
56 | { | ||
57 | .gpio_base = 0, | ||
58 | .irq_base = SPEAR_GPIO0_INT_BASE, | ||
59 | }, { | ||
60 | .gpio_base = 8, | ||
61 | .irq_base = SPEAR_GPIO1_INT_BASE, | ||
62 | }, { | ||
63 | .gpio_base = 16, | ||
64 | .irq_base = SPEAR_GPIO2_INT_BASE, | ||
65 | }, | ||
66 | }; | ||
67 | |||
68 | struct amba_device gpio_device[] = { | ||
69 | { | ||
70 | .dev = { | ||
71 | .init_name = "gpio0", | ||
72 | .platform_data = &gpio_plat_data[0], | ||
73 | }, | ||
74 | .res = { | ||
75 | .start = SPEAR6XX_CPU_GPIO_BASE, | ||
76 | .end = SPEAR6XX_CPU_GPIO_BASE + | ||
77 | SPEAR6XX_CPU_GPIO_SIZE - 1, | ||
78 | .flags = IORESOURCE_MEM, | ||
79 | }, | ||
80 | .irq = {IRQ_LOCAL_GPIO, NO_IRQ}, | ||
81 | }, { | ||
82 | .dev = { | ||
83 | .init_name = "gpio1", | ||
84 | .platform_data = &gpio_plat_data[1], | ||
85 | }, | ||
86 | .res = { | ||
87 | .start = SPEAR6XX_ICM3_GPIO_BASE, | ||
88 | .end = SPEAR6XX_ICM3_GPIO_BASE + | ||
89 | SPEAR6XX_ICM3_GPIO_SIZE - 1, | ||
90 | .flags = IORESOURCE_MEM, | ||
91 | }, | ||
92 | .irq = {IRQ_BASIC_GPIO, NO_IRQ}, | ||
93 | }, { | ||
94 | .dev = { | ||
95 | .init_name = "gpio2", | ||
96 | .platform_data = &gpio_plat_data[2], | ||
97 | }, | ||
98 | .res = { | ||
99 | .start = SPEAR6XX_ICM2_GPIO_BASE, | ||
100 | .end = SPEAR6XX_ICM2_GPIO_BASE + | ||
101 | SPEAR6XX_ICM2_GPIO_SIZE - 1, | ||
102 | .flags = IORESOURCE_MEM, | ||
103 | }, | ||
104 | .irq = {IRQ_APPL_GPIO, NO_IRQ}, | ||
105 | } | ||
106 | }; | ||
107 | |||
108 | /* This will add devices, and do machine specific tasks */ | ||
109 | void __init spear6xx_init(void) | ||
110 | { | ||
111 | /* nothing to do for now */ | ||
112 | } | ||
113 | |||
114 | /* This will initialize vic */ | ||
115 | void __init spear6xx_init_irq(void) | ||
116 | { | ||
117 | vic_init((void __iomem *)VA_SPEAR6XX_CPU_VIC_PRI_BASE, 0, ~0, 0); | ||
118 | vic_init((void __iomem *)VA_SPEAR6XX_CPU_VIC_SEC_BASE, 32, ~0, 0); | ||
119 | } | ||
120 | |||
121 | /* Following will create static virtual/physical mappings */ | ||
122 | static struct map_desc spear6xx_io_desc[] __initdata = { | ||
123 | { | ||
124 | .virtual = VA_SPEAR6XX_ICM1_UART0_BASE, | ||
125 | .pfn = __phys_to_pfn(SPEAR6XX_ICM1_UART0_BASE), | ||
126 | .length = SPEAR6XX_ICM1_UART0_SIZE, | ||
127 | .type = MT_DEVICE | ||
128 | }, { | ||
129 | .virtual = VA_SPEAR6XX_CPU_VIC_PRI_BASE, | ||
130 | .pfn = __phys_to_pfn(SPEAR6XX_CPU_VIC_PRI_BASE), | ||
131 | .length = SPEAR6XX_CPU_VIC_PRI_SIZE, | ||
132 | .type = MT_DEVICE | ||
133 | }, { | ||
134 | .virtual = VA_SPEAR6XX_CPU_VIC_SEC_BASE, | ||
135 | .pfn = __phys_to_pfn(SPEAR6XX_CPU_VIC_SEC_BASE), | ||
136 | .length = SPEAR6XX_CPU_VIC_SEC_SIZE, | ||
137 | .type = MT_DEVICE | ||
138 | }, { | ||
139 | .virtual = VA_SPEAR6XX_ICM3_SYS_CTRL_BASE, | ||
140 | .pfn = __phys_to_pfn(SPEAR6XX_ICM3_SYS_CTRL_BASE), | ||
141 | .length = SPEAR6XX_ICM3_MISC_REG_BASE, | ||
142 | .type = MT_DEVICE | ||
143 | }, { | ||
144 | .virtual = VA_SPEAR6XX_ICM3_MISC_REG_BASE, | ||
145 | .pfn = __phys_to_pfn(SPEAR6XX_ICM3_MISC_REG_BASE), | ||
146 | .length = SPEAR6XX_ICM3_MISC_REG_SIZE, | ||
147 | .type = MT_DEVICE | ||
148 | }, | ||
149 | }; | ||
150 | |||
151 | /* This will create static memory mapping for selected devices */ | ||
152 | void __init spear6xx_map_io(void) | ||
153 | { | ||
154 | iotable_init(spear6xx_io_desc, ARRAY_SIZE(spear6xx_io_desc)); | ||
155 | |||
156 | /* This will initialize clock framework */ | ||
157 | clk_init(); | ||
158 | } | ||
diff --git a/arch/arm/mach-u300/mmc.c b/arch/arm/mach-u300/mmc.c index 109f5a6e71c7..783f1236fe1b 100644 --- a/arch/arm/mach-u300/mmc.c +++ b/arch/arm/mach-u300/mmc.c | |||
@@ -101,11 +101,12 @@ int __devinit mmc_init(struct amba_device *adev) | |||
101 | * we have a regulator we can control instead. | 101 | * we have a regulator we can control instead. |
102 | */ | 102 | */ |
103 | /* Nominally 2.85V on our platform */ | 103 | /* Nominally 2.85V on our platform */ |
104 | mmci_card->mmc0_plat_data.f_max = 24000000; | ||
104 | mmci_card->mmc0_plat_data.status = mmc_status; | 105 | mmci_card->mmc0_plat_data.status = mmc_status; |
105 | mmci_card->mmc0_plat_data.gpio_wp = -1; | 106 | mmci_card->mmc0_plat_data.gpio_wp = -1; |
106 | mmci_card->mmc0_plat_data.gpio_cd = -1; | 107 | mmci_card->mmc0_plat_data.gpio_cd = -1; |
107 | mmci_card->mmc0_plat_data.capabilities = MMC_CAP_MMC_HIGHSPEED | | 108 | mmci_card->mmc0_plat_data.capabilities = MMC_CAP_MMC_HIGHSPEED | |
108 | MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA; | 109 | MMC_CAP_SD_HIGHSPEED | MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; |
109 | 110 | ||
110 | mmcsd_device->platform_data = (void *) &mmci_card->mmc0_plat_data; | 111 | mmcsd_device->platform_data = (void *) &mmci_card->mmc0_plat_data; |
111 | 112 | ||
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 03625d744857..6625e5bbf4d6 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -1,15 +1,42 @@ | |||
1 | menu "ST-Ericsson platform type" | 1 | if ARCH_U8500 |
2 | depends on ARCH_U8500 | ||
3 | 2 | ||
4 | comment "ST-Ericsson Multicore Mobile Platforms" | 3 | config UX500_SOC_COMMON |
5 | 4 | bool | |
6 | config MACH_U8500_MOP | ||
7 | bool "U8500 Early Development platform" | ||
8 | default y | 5 | default y |
9 | select ARM_GIC | 6 | select ARM_GIC |
10 | select HAS_MTU | 7 | select HAS_MTU |
8 | select NOMADIK_GPIO | ||
9 | |||
10 | config UX500_SOC_DB8500 | ||
11 | bool | ||
12 | |||
13 | config UX500_SOC_DB5500 | ||
14 | bool | ||
15 | |||
16 | choice | ||
17 | prompt "Ux500 target platform" | ||
18 | default MACH_U8500_MOP | ||
19 | |||
20 | config MACH_U8500_MOP | ||
21 | bool "U8500 Development platform" | ||
22 | select UX500_SOC_DB8500 | ||
11 | help | 23 | help |
12 | Include support for mop500 development platform | 24 | Include support for mop500 development platform |
13 | based on U8500 architecture. The platform is based | 25 | based on U8500 architecture. The platform is based |
14 | on early drop silicon version of 8500. | 26 | on early drop silicon version of 8500. |
15 | endmenu | 27 | |
28 | config MACH_U5500 | ||
29 | bool "U5500 Development platform" | ||
30 | select UX500_SOC_DB5500 | ||
31 | help | ||
32 | Include support for the U5500 development platform. | ||
33 | endchoice | ||
34 | |||
35 | config UX500_DEBUG_UART | ||
36 | int "Ux500 UART to use for low-level debug" | ||
37 | default 2 | ||
38 | help | ||
39 | Choose the UART on which kernel low-level debug messages should be | ||
40 | output. | ||
41 | |||
42 | endif | ||
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile index 95e6e24c0042..c7bc4199e3a8 100644 --- a/arch/arm/mach-ux500/Makefile +++ b/arch/arm/mach-ux500/Makefile | |||
@@ -2,7 +2,9 @@ | |||
2 | # Makefile for the linux kernel, U8500 machine. | 2 | # Makefile for the linux kernel, U8500 machine. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := clock.o | 5 | obj-y := clock.o cpu.o devices.o |
6 | obj-$(CONFIG_ARCH_U8500) += cpu-u8500.o | 6 | obj-$(CONFIG_UX500_SOC_DB5500) += cpu-db5500.o devices-db5500.o |
7 | obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o | ||
7 | obj-$(CONFIG_MACH_U8500_MOP) += board-mop500.o | 8 | obj-$(CONFIG_MACH_U8500_MOP) += board-mop500.o |
9 | obj-$(CONFIG_MACH_U5500) += board-u5500.o | ||
8 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o localtimer.o | 10 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o localtimer.o |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 803aec1d6728..072196c57263 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -17,37 +17,14 @@ | |||
17 | #include <linux/amba/pl022.h> | 17 | #include <linux/amba/pl022.h> |
18 | #include <linux/spi/spi.h> | 18 | #include <linux/spi/spi.h> |
19 | 19 | ||
20 | #include <asm/localtimer.h> | ||
21 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
22 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
23 | 22 | ||
24 | #include <plat/mtu.h> | ||
25 | #include <plat/i2c.h> | 23 | #include <plat/i2c.h> |
26 | 24 | ||
27 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
28 | #include <mach/setup.h> | 26 | #include <mach/setup.h> |
29 | 27 | #include <mach/devices.h> | |
30 | #define __MEM_4K_RESOURCE(x) \ | ||
31 | .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM} | ||
32 | |||
33 | /* These are active devices on this board */ | ||
34 | static struct amba_device uart0_device = { | ||
35 | .dev = { .init_name = "uart0" }, | ||
36 | __MEM_4K_RESOURCE(U8500_UART0_BASE), | ||
37 | .irq = {IRQ_UART0, NO_IRQ}, | ||
38 | }; | ||
39 | |||
40 | static struct amba_device uart1_device = { | ||
41 | .dev = { .init_name = "uart1" }, | ||
42 | __MEM_4K_RESOURCE(U8500_UART1_BASE), | ||
43 | .irq = {IRQ_UART1, NO_IRQ}, | ||
44 | }; | ||
45 | |||
46 | static struct amba_device uart2_device = { | ||
47 | .dev = { .init_name = "uart2" }, | ||
48 | __MEM_4K_RESOURCE(U8500_UART2_BASE), | ||
49 | .irq = {IRQ_UART2, NO_IRQ}, | ||
50 | }; | ||
51 | 28 | ||
52 | static void ab4500_spi_cs_control(u32 command) | 29 | static void ab4500_spi_cs_control(u32 command) |
53 | { | 30 | { |
@@ -93,55 +70,8 @@ static struct pl022_ssp_controller ssp0_platform_data = { | |||
93 | .num_chipselect = 5, | 70 | .num_chipselect = 5, |
94 | }; | 71 | }; |
95 | 72 | ||
96 | static struct amba_device pl022_device = { | ||
97 | .dev = { | ||
98 | .coherent_dma_mask = ~0, | ||
99 | .init_name = "pl022", | ||
100 | .platform_data = &ssp0_platform_data, | ||
101 | }, | ||
102 | .res = { | ||
103 | .start = U8500_SSP0_BASE, | ||
104 | .end = U8500_SSP0_BASE + SZ_4K - 1, | ||
105 | .flags = IORESOURCE_MEM, | ||
106 | }, | ||
107 | .irq = {IRQ_SSP0, NO_IRQ }, | ||
108 | /* ST-Ericsson modified id */ | ||
109 | .periphid = SSP_PER_ID, | ||
110 | }; | ||
111 | |||
112 | static struct amba_device pl031_device = { | ||
113 | .dev = { | ||
114 | .init_name = "pl031", | ||
115 | }, | ||
116 | .res = { | ||
117 | .start = U8500_RTC_BASE, | ||
118 | .end = U8500_RTC_BASE + SZ_4K - 1, | ||
119 | .flags = IORESOURCE_MEM, | ||
120 | }, | ||
121 | .irq = {IRQ_RTC_RTT, NO_IRQ}, | ||
122 | }; | ||
123 | |||
124 | #define U8500_I2C_RESOURCES(id, size) \ | ||
125 | static struct resource u8500_i2c_resources_##id[] = { \ | ||
126 | [0] = { \ | ||
127 | .start = U8500_I2C##id##_BASE, \ | ||
128 | .end = U8500_I2C##id##_BASE + size - 1, \ | ||
129 | .flags = IORESOURCE_MEM, \ | ||
130 | }, \ | ||
131 | [1] = { \ | ||
132 | .start = IRQ_I2C##id, \ | ||
133 | .end = IRQ_I2C##id, \ | ||
134 | .flags = IORESOURCE_IRQ \ | ||
135 | } \ | ||
136 | } | ||
137 | |||
138 | U8500_I2C_RESOURCES(0, SZ_4K); | ||
139 | U8500_I2C_RESOURCES(1, SZ_4K); | ||
140 | U8500_I2C_RESOURCES(2, SZ_4K); | ||
141 | U8500_I2C_RESOURCES(3, SZ_4K); | ||
142 | |||
143 | #define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \ | 73 | #define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \ |
144 | static struct nmk_i2c_controller u8500_i2c_##id = { \ | 74 | static struct nmk_i2c_controller u8500_i2c##id##_data = { \ |
145 | /* \ | 75 | /* \ |
146 | * slave data setup time, which is \ | 76 | * slave data setup time, which is \ |
147 | * 250 ns,100ns,10ns which is 14,6,2 \ | 77 | * 250 ns,100ns,10ns which is 14,6,2 \ |
@@ -169,58 +99,32 @@ U8500_I2C_CONTROLLER(1, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); | |||
169 | U8500_I2C_CONTROLLER(2, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); | 99 | U8500_I2C_CONTROLLER(2, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); |
170 | U8500_I2C_CONTROLLER(3, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); | 100 | U8500_I2C_CONTROLLER(3, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); |
171 | 101 | ||
172 | #define U8500_I2C_PDEVICE(cid) \ | ||
173 | static struct platform_device i2c_controller##cid = { \ | ||
174 | .name = "nmk-i2c", \ | ||
175 | .id = cid, \ | ||
176 | .num_resources = 2, \ | ||
177 | .resource = u8500_i2c_resources_##cid, \ | ||
178 | .dev = { \ | ||
179 | .platform_data = &u8500_i2c_##cid \ | ||
180 | } \ | ||
181 | } | ||
182 | |||
183 | U8500_I2C_PDEVICE(0); | ||
184 | U8500_I2C_PDEVICE(1); | ||
185 | U8500_I2C_PDEVICE(2); | ||
186 | U8500_I2C_PDEVICE(3); | ||
187 | |||
188 | static struct amba_device *amba_devs[] __initdata = { | 102 | static struct amba_device *amba_devs[] __initdata = { |
189 | &uart0_device, | 103 | &ux500_uart0_device, |
190 | &uart1_device, | 104 | &ux500_uart1_device, |
191 | &uart2_device, | 105 | &ux500_uart2_device, |
192 | &pl022_device, | 106 | &u8500_ssp0_device, |
193 | &pl031_device, | ||
194 | }; | 107 | }; |
195 | 108 | ||
196 | /* add any platform devices here - TODO */ | 109 | /* add any platform devices here - TODO */ |
197 | static struct platform_device *platform_devs[] __initdata = { | 110 | static struct platform_device *platform_devs[] __initdata = { |
198 | &i2c_controller0, | 111 | &u8500_i2c0_device, |
199 | &i2c_controller1, | 112 | &ux500_i2c1_device, |
200 | &i2c_controller2, | 113 | &ux500_i2c2_device, |
201 | &i2c_controller3, | 114 | &ux500_i2c3_device, |
202 | }; | ||
203 | |||
204 | static void __init u8500_timer_init(void) | ||
205 | { | ||
206 | #ifdef CONFIG_LOCAL_TIMERS | ||
207 | /* Setup the local timer base */ | ||
208 | twd_base = __io_address(U8500_TWD_BASE); | ||
209 | #endif | ||
210 | /* Setup the MTU base */ | ||
211 | mtu_base = __io_address(U8500_MTU0_BASE); | ||
212 | |||
213 | nmdk_timer_init(); | ||
214 | } | ||
215 | |||
216 | static struct sys_timer u8500_timer = { | ||
217 | .init = u8500_timer_init, | ||
218 | }; | 115 | }; |
219 | 116 | ||
220 | static void __init u8500_init_machine(void) | 117 | static void __init u8500_init_machine(void) |
221 | { | 118 | { |
222 | int i; | 119 | int i; |
223 | 120 | ||
121 | u8500_i2c0_device.dev.platform_data = &u8500_i2c0_data; | ||
122 | ux500_i2c1_device.dev.platform_data = &u8500_i2c1_data; | ||
123 | ux500_i2c2_device.dev.platform_data = &u8500_i2c2_data; | ||
124 | ux500_i2c3_device.dev.platform_data = &u8500_i2c3_data; | ||
125 | |||
126 | u8500_ssp0_device.dev.platform_data = &ssp0_platform_data; | ||
127 | |||
224 | /* Register the active AMBA devices on this board */ | 128 | /* Register the active AMBA devices on this board */ |
225 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) | 129 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) |
226 | amba_device_register(amba_devs[i], &iomem_resource); | 130 | amba_device_register(amba_devs[i], &iomem_resource); |
@@ -239,8 +143,8 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | |||
239 | .io_pg_offst = (IO_ADDRESS(U8500_UART2_BASE) >> 18) & 0xfffc, | 143 | .io_pg_offst = (IO_ADDRESS(U8500_UART2_BASE) >> 18) & 0xfffc, |
240 | .boot_params = 0x100, | 144 | .boot_params = 0x100, |
241 | .map_io = u8500_map_io, | 145 | .map_io = u8500_map_io, |
242 | .init_irq = u8500_init_irq, | 146 | .init_irq = ux500_init_irq, |
243 | /* we re-use nomadik timer here */ | 147 | /* we re-use nomadik timer here */ |
244 | .timer = &u8500_timer, | 148 | .timer = &ux500_timer, |
245 | .init_machine = u8500_init_machine, | 149 | .init_machine = u8500_init_machine, |
246 | MACHINE_END | 150 | MACHINE_END |
diff --git a/arch/arm/mach-ux500/board-u5500.c b/arch/arm/mach-ux500/board-u5500.c new file mode 100644 index 000000000000..4430e69cf538 --- /dev/null +++ b/arch/arm/mach-ux500/board-u5500.c | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #include <linux/init.h> | ||
9 | #include <linux/platform_device.h> | ||
10 | #include <linux/amba/bus.h> | ||
11 | #include <linux/gpio.h> | ||
12 | |||
13 | #include <asm/mach/arch.h> | ||
14 | #include <asm/mach-types.h> | ||
15 | |||
16 | #include <mach/hardware.h> | ||
17 | #include <mach/devices.h> | ||
18 | #include <mach/setup.h> | ||
19 | |||
20 | static struct amba_device *amba_board_devs[] __initdata = { | ||
21 | &ux500_uart0_device, | ||
22 | &ux500_uart1_device, | ||
23 | &ux500_uart2_device, | ||
24 | }; | ||
25 | |||
26 | static void __init u5500_init_machine(void) | ||
27 | { | ||
28 | u5500_init_devices(); | ||
29 | |||
30 | amba_add_devices(amba_board_devs, ARRAY_SIZE(amba_board_devs)); | ||
31 | } | ||
32 | |||
33 | MACHINE_START(U8500, "ST-Ericsson U5500 Platform") | ||
34 | .phys_io = UX500_UART0_BASE, | ||
35 | .io_pg_offst = (IO_ADDRESS(UX500_UART0_BASE) >> 18) & 0xfffc, | ||
36 | .boot_params = 0x00000100, | ||
37 | .map_io = u5500_map_io, | ||
38 | .init_irq = ux500_init_irq, | ||
39 | .timer = &ux500_timer, | ||
40 | .init_machine = u5500_init_machine, | ||
41 | MACHINE_END | ||
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index 8359a73d0041..1b2c9890e8b4 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2009 ST-Ericsson | 2 | * Copyright (C) 2009 ST-Ericsson |
3 | * heavily based on realview platform | 3 | * Copyright (C) 2009 STMicroelectronics |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License version 2 as | 6 | * it under the terms of the GNU General Public License version 2 as |
@@ -12,33 +12,130 @@ | |||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/err.h> | 13 | #include <linux/err.h> |
14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
15 | #include <linux/mutex.h> | 15 | #include <linux/io.h> |
16 | 16 | ||
17 | #include <asm/clkdev.h> | 17 | #include <asm/clkdev.h> |
18 | 18 | ||
19 | /* currently the clk structure | 19 | #include <mach/hardware.h> |
20 | * just supports rate. This would | 20 | #include "clock.h" |
21 | * be extended as and when new devices are | 21 | |
22 | * added - TODO | 22 | #define PRCC_PCKEN 0x00 |
23 | */ | 23 | #define PRCC_PCKDIS 0x04 |
24 | struct clk { | 24 | #define PRCC_KCKEN 0x08 |
25 | unsigned long rate; | 25 | #define PRCC_KCKDIS 0x0C |
26 | }; | 26 | |
27 | #define PRCM_YYCLKEN0_MGT_SET 0x510 | ||
28 | #define PRCM_YYCLKEN1_MGT_SET 0x514 | ||
29 | #define PRCM_YYCLKEN0_MGT_CLR 0x518 | ||
30 | #define PRCM_YYCLKEN1_MGT_CLR 0x51C | ||
31 | #define PRCM_YYCLKEN0_MGT_VAL 0x520 | ||
32 | #define PRCM_YYCLKEN1_MGT_VAL 0x524 | ||
33 | |||
34 | #define PRCM_SVAMMDSPCLK_MGT 0x008 | ||
35 | #define PRCM_SIAMMDSPCLK_MGT 0x00C | ||
36 | #define PRCM_SGACLK_MGT 0x014 | ||
37 | #define PRCM_UARTCLK_MGT 0x018 | ||
38 | #define PRCM_MSP02CLK_MGT 0x01C | ||
39 | #define PRCM_MSP1CLK_MGT 0x288 | ||
40 | #define PRCM_I2CCLK_MGT 0x020 | ||
41 | #define PRCM_SDMMCCLK_MGT 0x024 | ||
42 | #define PRCM_SLIMCLK_MGT 0x028 | ||
43 | #define PRCM_PER1CLK_MGT 0x02C | ||
44 | #define PRCM_PER2CLK_MGT 0x030 | ||
45 | #define PRCM_PER3CLK_MGT 0x034 | ||
46 | #define PRCM_PER5CLK_MGT 0x038 | ||
47 | #define PRCM_PER6CLK_MGT 0x03C | ||
48 | #define PRCM_PER7CLK_MGT 0x040 | ||
49 | #define PRCM_LCDCLK_MGT 0x044 | ||
50 | #define PRCM_BMLCLK_MGT 0x04C | ||
51 | #define PRCM_HSITXCLK_MGT 0x050 | ||
52 | #define PRCM_HSIRXCLK_MGT 0x054 | ||
53 | #define PRCM_HDMICLK_MGT 0x058 | ||
54 | #define PRCM_APEATCLK_MGT 0x05C | ||
55 | #define PRCM_APETRACECLK_MGT 0x060 | ||
56 | #define PRCM_MCDECLK_MGT 0x064 | ||
57 | #define PRCM_IPI2CCLK_MGT 0x068 | ||
58 | #define PRCM_DSIALTCLK_MGT 0x06C | ||
59 | #define PRCM_DMACLK_MGT 0x074 | ||
60 | #define PRCM_B2R2CLK_MGT 0x078 | ||
61 | #define PRCM_TVCLK_MGT 0x07C | ||
62 | #define PRCM_UNIPROCLK_MGT 0x278 | ||
63 | #define PRCM_SSPCLK_MGT 0x280 | ||
64 | #define PRCM_RNGCLK_MGT 0x284 | ||
65 | #define PRCM_UICCCLK_MGT 0x27C | ||
66 | |||
67 | #define PRCM_MGT_ENABLE (1 << 8) | ||
68 | |||
69 | static DEFINE_SPINLOCK(clocks_lock); | ||
70 | |||
71 | static void __clk_enable(struct clk *clk) | ||
72 | { | ||
73 | if (clk->enabled++ == 0) { | ||
74 | if (clk->parent_cluster) | ||
75 | __clk_enable(clk->parent_cluster); | ||
76 | |||
77 | if (clk->parent_periph) | ||
78 | __clk_enable(clk->parent_periph); | ||
79 | |||
80 | if (clk->ops && clk->ops->enable) | ||
81 | clk->ops->enable(clk); | ||
82 | } | ||
83 | } | ||
27 | 84 | ||
28 | int clk_enable(struct clk *clk) | 85 | int clk_enable(struct clk *clk) |
29 | { | 86 | { |
87 | unsigned long flags; | ||
88 | |||
89 | spin_lock_irqsave(&clocks_lock, flags); | ||
90 | __clk_enable(clk); | ||
91 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
92 | |||
30 | return 0; | 93 | return 0; |
31 | } | 94 | } |
32 | EXPORT_SYMBOL(clk_enable); | 95 | EXPORT_SYMBOL(clk_enable); |
33 | 96 | ||
97 | static void __clk_disable(struct clk *clk) | ||
98 | { | ||
99 | if (--clk->enabled == 0) { | ||
100 | if (clk->ops && clk->ops->disable) | ||
101 | clk->ops->disable(clk); | ||
102 | |||
103 | if (clk->parent_periph) | ||
104 | __clk_disable(clk->parent_periph); | ||
105 | |||
106 | if (clk->parent_cluster) | ||
107 | __clk_disable(clk->parent_cluster); | ||
108 | } | ||
109 | } | ||
110 | |||
34 | void clk_disable(struct clk *clk) | 111 | void clk_disable(struct clk *clk) |
35 | { | 112 | { |
113 | unsigned long flags; | ||
114 | |||
115 | WARN_ON(!clk->enabled); | ||
116 | |||
117 | spin_lock_irqsave(&clocks_lock, flags); | ||
118 | __clk_disable(clk); | ||
119 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
36 | } | 120 | } |
37 | EXPORT_SYMBOL(clk_disable); | 121 | EXPORT_SYMBOL(clk_disable); |
38 | 122 | ||
39 | unsigned long clk_get_rate(struct clk *clk) | 123 | unsigned long clk_get_rate(struct clk *clk) |
40 | { | 124 | { |
41 | return clk->rate; | 125 | unsigned long rate; |
126 | |||
127 | if (clk->ops && clk->ops->get_rate) | ||
128 | return clk->ops->get_rate(clk); | ||
129 | |||
130 | rate = clk->rate; | ||
131 | if (!rate) { | ||
132 | if (clk->parent_periph) | ||
133 | rate = clk_get_rate(clk->parent_periph); | ||
134 | else if (clk->parent_cluster) | ||
135 | rate = clk_get_rate(clk->parent_cluster); | ||
136 | } | ||
137 | |||
138 | return rate; | ||
42 | } | 139 | } |
43 | EXPORT_SYMBOL(clk_get_rate); | 140 | EXPORT_SYMBOL(clk_get_rate); |
44 | 141 | ||
@@ -56,37 +153,373 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
56 | } | 153 | } |
57 | EXPORT_SYMBOL(clk_set_rate); | 154 | EXPORT_SYMBOL(clk_set_rate); |
58 | 155 | ||
59 | /* ssp clock */ | 156 | static void clk_prcmu_enable(struct clk *clk) |
60 | static struct clk ssp_clk = { | 157 | { |
61 | .rate = 48000000, | 158 | void __iomem *cg_set_reg = __io_address(U8500_PRCMU_BASE) |
159 | + PRCM_YYCLKEN0_MGT_SET + clk->prcmu_cg_off; | ||
160 | |||
161 | writel(1 << clk->prcmu_cg_bit, cg_set_reg); | ||
162 | } | ||
163 | |||
164 | static void clk_prcmu_disable(struct clk *clk) | ||
165 | { | ||
166 | void __iomem *cg_clr_reg = __io_address(U8500_PRCMU_BASE) | ||
167 | + PRCM_YYCLKEN0_MGT_CLR + clk->prcmu_cg_off; | ||
168 | |||
169 | writel(1 << clk->prcmu_cg_bit, cg_clr_reg); | ||
170 | } | ||
171 | |||
172 | /* ED doesn't have the combined set/clr registers */ | ||
173 | static void clk_prcmu_ed_enable(struct clk *clk) | ||
174 | { | ||
175 | void __iomem *addr = __io_address(U8500_PRCMU_BASE) | ||
176 | + clk->prcmu_cg_mgt; | ||
177 | |||
178 | writel(readl(addr) | PRCM_MGT_ENABLE, addr); | ||
179 | } | ||
180 | |||
181 | static void clk_prcmu_ed_disable(struct clk *clk) | ||
182 | { | ||
183 | void __iomem *addr = __io_address(U8500_PRCMU_BASE) | ||
184 | + clk->prcmu_cg_mgt; | ||
185 | |||
186 | writel(readl(addr) & ~PRCM_MGT_ENABLE, addr); | ||
187 | } | ||
188 | |||
189 | static struct clkops clk_prcmu_ops = { | ||
190 | .enable = clk_prcmu_enable, | ||
191 | .disable = clk_prcmu_disable, | ||
62 | }; | 192 | }; |
63 | 193 | ||
64 | /* fixed clock */ | 194 | static unsigned int clkrst_base[] = { |
65 | static struct clk f38_clk = { | 195 | [1] = U8500_CLKRST1_BASE, |
66 | .rate = 38400000, | 196 | [2] = U8500_CLKRST2_BASE, |
197 | [3] = U8500_CLKRST3_BASE, | ||
198 | [5] = U8500_CLKRST5_BASE, | ||
199 | [6] = U8500_CLKRST6_BASE, | ||
200 | [7] = U8500_CLKRST7_BASE_ED, | ||
67 | }; | 201 | }; |
68 | 202 | ||
69 | static struct clk_lookup lookups[] = { | 203 | static void clk_prcc_enable(struct clk *clk) |
70 | { | 204 | { |
71 | /* UART0 */ | 205 | void __iomem *addr = __io_address(clkrst_base[clk->cluster]); |
72 | .dev_id = "uart0", | 206 | |
73 | .clk = &f38_clk, | 207 | if (clk->prcc_kernel != -1) |
74 | }, { /* UART1 */ | 208 | writel(1 << clk->prcc_kernel, addr + PRCC_KCKEN); |
75 | .dev_id = "uart1", | 209 | |
76 | .clk = &f38_clk, | 210 | if (clk->prcc_bus != -1) |
77 | }, { /* UART2 */ | 211 | writel(1 << clk->prcc_bus, addr + PRCC_PCKEN); |
78 | .dev_id = "uart2", | 212 | } |
79 | .clk = &f38_clk, | 213 | |
80 | }, { /* SSP */ | 214 | static void clk_prcc_disable(struct clk *clk) |
81 | .dev_id = "pl022", | 215 | { |
82 | .clk = &ssp_clk, | 216 | void __iomem *addr = __io_address(clkrst_base[clk->cluster]); |
83 | } | 217 | |
218 | if (clk->prcc_bus != -1) | ||
219 | writel(1 << clk->prcc_bus, addr + PRCC_PCKDIS); | ||
220 | |||
221 | if (clk->prcc_kernel != -1) | ||
222 | writel(1 << clk->prcc_kernel, addr + PRCC_KCKDIS); | ||
223 | } | ||
224 | |||
225 | static struct clkops clk_prcc_ops = { | ||
226 | .enable = clk_prcc_enable, | ||
227 | .disable = clk_prcc_disable, | ||
228 | }; | ||
229 | |||
230 | static struct clk clk_32khz = { | ||
231 | .rate = 32000, | ||
232 | }; | ||
233 | |||
234 | /* | ||
235 | * PRCMU level clock gating | ||
236 | */ | ||
237 | |||
238 | /* Bank 0 */ | ||
239 | static DEFINE_PRCMU_CLK(svaclk, 0x0, 2, SVAMMDSPCLK); | ||
240 | static DEFINE_PRCMU_CLK(siaclk, 0x0, 3, SIAMMDSPCLK); | ||
241 | static DEFINE_PRCMU_CLK(sgaclk, 0x0, 4, SGACLK); | ||
242 | static DEFINE_PRCMU_CLK_RATE(uartclk, 0x0, 5, UARTCLK, 38400000); | ||
243 | static DEFINE_PRCMU_CLK(msp02clk, 0x0, 6, MSP02CLK); | ||
244 | static DEFINE_PRCMU_CLK(msp1clk, 0x0, 7, MSP1CLK); /* v1 */ | ||
245 | static DEFINE_PRCMU_CLK_RATE(i2cclk, 0x0, 8, I2CCLK, 48000000); | ||
246 | static DEFINE_PRCMU_CLK_RATE(sdmmcclk, 0x0, 9, SDMMCCLK, 50000000); | ||
247 | static DEFINE_PRCMU_CLK(slimclk, 0x0, 10, SLIMCLK); | ||
248 | static DEFINE_PRCMU_CLK(per1clk, 0x0, 11, PER1CLK); | ||
249 | static DEFINE_PRCMU_CLK(per2clk, 0x0, 12, PER2CLK); | ||
250 | static DEFINE_PRCMU_CLK(per3clk, 0x0, 13, PER3CLK); | ||
251 | static DEFINE_PRCMU_CLK(per5clk, 0x0, 14, PER5CLK); | ||
252 | static DEFINE_PRCMU_CLK_RATE(per6clk, 0x0, 15, PER6CLK, 133330000); | ||
253 | static DEFINE_PRCMU_CLK_RATE(per7clk, 0x0, 16, PER7CLK, 100000000); | ||
254 | static DEFINE_PRCMU_CLK(lcdclk, 0x0, 17, LCDCLK); | ||
255 | static DEFINE_PRCMU_CLK(bmlclk, 0x0, 18, BMLCLK); | ||
256 | static DEFINE_PRCMU_CLK(hsitxclk, 0x0, 19, HSITXCLK); | ||
257 | static DEFINE_PRCMU_CLK(hsirxclk, 0x0, 20, HSIRXCLK); | ||
258 | static DEFINE_PRCMU_CLK(hdmiclk, 0x0, 21, HDMICLK); | ||
259 | static DEFINE_PRCMU_CLK(apeatclk, 0x0, 22, APEATCLK); | ||
260 | static DEFINE_PRCMU_CLK(apetraceclk, 0x0, 23, APETRACECLK); | ||
261 | static DEFINE_PRCMU_CLK(mcdeclk, 0x0, 24, MCDECLK); | ||
262 | static DEFINE_PRCMU_CLK(ipi2clk, 0x0, 25, IPI2CCLK); | ||
263 | static DEFINE_PRCMU_CLK(dsialtclk, 0x0, 26, DSIALTCLK); /* v1 */ | ||
264 | static DEFINE_PRCMU_CLK(dmaclk, 0x0, 27, DMACLK); | ||
265 | static DEFINE_PRCMU_CLK(b2r2clk, 0x0, 28, B2R2CLK); | ||
266 | static DEFINE_PRCMU_CLK(tvclk, 0x0, 29, TVCLK); | ||
267 | static DEFINE_PRCMU_CLK(uniproclk, 0x0, 30, UNIPROCLK); /* v1 */ | ||
268 | static DEFINE_PRCMU_CLK_RATE(sspclk, 0x0, 31, SSPCLK, 48000000); /* v1 */ | ||
269 | |||
270 | /* Bank 1 */ | ||
271 | static DEFINE_PRCMU_CLK(rngclk, 0x4, 0, RNGCLK); /* v1 */ | ||
272 | static DEFINE_PRCMU_CLK(uiccclk, 0x4, 1, UICCCLK); /* v1 */ | ||
273 | |||
274 | /* | ||
275 | * PRCC level clock gating | ||
276 | * Format: per#, clk, PCKEN bit, KCKEN bit, parent | ||
277 | */ | ||
278 | |||
279 | /* Peripheral Cluster #1 */ | ||
280 | static DEFINE_PRCC_CLK(1, i2c4, 10, 9, &clk_i2cclk); | ||
281 | static DEFINE_PRCC_CLK(1, gpio0, 9, -1, NULL); | ||
282 | static DEFINE_PRCC_CLK(1, slimbus0, 8, 8, &clk_slimclk); | ||
283 | static DEFINE_PRCC_CLK(1, spi3_ed, 7, 7, NULL); | ||
284 | static DEFINE_PRCC_CLK(1, spi3_v1, 7, -1, NULL); | ||
285 | static DEFINE_PRCC_CLK(1, i2c2, 6, 6, &clk_i2cclk); | ||
286 | static DEFINE_PRCC_CLK(1, sdi0, 5, 5, &clk_sdmmcclk); | ||
287 | static DEFINE_PRCC_CLK(1, msp1_ed, 4, 4, &clk_msp02clk); | ||
288 | static DEFINE_PRCC_CLK(1, msp1_v1, 4, 4, &clk_msp1clk); | ||
289 | static DEFINE_PRCC_CLK(1, msp0, 3, 3, &clk_msp02clk); | ||
290 | static DEFINE_PRCC_CLK(1, i2c1, 2, 2, &clk_i2cclk); | ||
291 | static DEFINE_PRCC_CLK(1, uart1, 1, 1, &clk_uartclk); | ||
292 | static DEFINE_PRCC_CLK(1, uart0, 0, 0, &clk_uartclk); | ||
293 | |||
294 | /* Peripheral Cluster #2 */ | ||
295 | |||
296 | static DEFINE_PRCC_CLK(2, gpio1_ed, 12, -1, NULL); | ||
297 | static DEFINE_PRCC_CLK(2, ssitx_ed, 11, -1, NULL); | ||
298 | static DEFINE_PRCC_CLK(2, ssirx_ed, 10, -1, NULL); | ||
299 | static DEFINE_PRCC_CLK(2, spi0_ed, 9, -1, NULL); | ||
300 | static DEFINE_PRCC_CLK(2, sdi3_ed, 8, 6, &clk_sdmmcclk); | ||
301 | static DEFINE_PRCC_CLK(2, sdi1_ed, 7, 5, &clk_sdmmcclk); | ||
302 | static DEFINE_PRCC_CLK(2, msp2_ed, 6, 4, &clk_msp02clk); | ||
303 | static DEFINE_PRCC_CLK(2, sdi4_ed, 4, 2, &clk_sdmmcclk); | ||
304 | static DEFINE_PRCC_CLK(2, pwl_ed, 3, 1, NULL); | ||
305 | static DEFINE_PRCC_CLK(2, spi1_ed, 2, -1, NULL); | ||
306 | static DEFINE_PRCC_CLK(2, spi2_ed, 1, -1, NULL); | ||
307 | static DEFINE_PRCC_CLK(2, i2c3_ed, 0, 0, &clk_i2cclk); | ||
308 | |||
309 | static DEFINE_PRCC_CLK(2, gpio1_v1, 11, -1, NULL); | ||
310 | static DEFINE_PRCC_CLK(2, ssitx_v1, 10, 7, NULL); | ||
311 | static DEFINE_PRCC_CLK(2, ssirx_v1, 9, 6, NULL); | ||
312 | static DEFINE_PRCC_CLK(2, spi0_v1, 8, -1, NULL); | ||
313 | static DEFINE_PRCC_CLK(2, sdi3_v1, 7, 5, &clk_sdmmcclk); | ||
314 | static DEFINE_PRCC_CLK(2, sdi1_v1, 6, 4, &clk_sdmmcclk); | ||
315 | static DEFINE_PRCC_CLK(2, msp2_v1, 5, 3, &clk_msp02clk); | ||
316 | static DEFINE_PRCC_CLK(2, sdi4_v1, 4, 2, &clk_sdmmcclk); | ||
317 | static DEFINE_PRCC_CLK(2, pwl_v1, 3, 1, NULL); | ||
318 | static DEFINE_PRCC_CLK(2, spi1_v1, 2, -1, NULL); | ||
319 | static DEFINE_PRCC_CLK(2, spi2_v1, 1, -1, NULL); | ||
320 | static DEFINE_PRCC_CLK(2, i2c3_v1, 0, 0, &clk_i2cclk); | ||
321 | |||
322 | /* Peripheral Cluster #3 */ | ||
323 | static DEFINE_PRCC_CLK(3, gpio2, 8, -1, NULL); | ||
324 | static DEFINE_PRCC_CLK(3, sdi5, 7, 7, &clk_sdmmcclk); | ||
325 | static DEFINE_PRCC_CLK(3, uart2, 6, 6, &clk_uartclk); | ||
326 | static DEFINE_PRCC_CLK(3, ske, 5, 5, &clk_32khz); | ||
327 | static DEFINE_PRCC_CLK(3, sdi2, 4, 4, &clk_sdmmcclk); | ||
328 | static DEFINE_PRCC_CLK(3, i2c0, 3, 3, &clk_i2cclk); | ||
329 | static DEFINE_PRCC_CLK(3, ssp1_ed, 2, 2, &clk_i2cclk); | ||
330 | static DEFINE_PRCC_CLK(3, ssp0_ed, 1, 1, &clk_i2cclk); | ||
331 | static DEFINE_PRCC_CLK(3, ssp1_v1, 2, 2, &clk_sspclk); | ||
332 | static DEFINE_PRCC_CLK(3, ssp0_v1, 1, 1, &clk_sspclk); | ||
333 | static DEFINE_PRCC_CLK(3, fsmc, 0, -1, NULL); | ||
334 | |||
335 | /* Peripheral Cluster #4 is in the always on domain */ | ||
336 | |||
337 | /* Peripheral Cluster #5 */ | ||
338 | static DEFINE_PRCC_CLK(5, gpio3, 1, -1, NULL); | ||
339 | static DEFINE_PRCC_CLK(5, usb_ed, 0, 0, &clk_i2cclk); | ||
340 | static DEFINE_PRCC_CLK(5, usb_v1, 0, 0, NULL); | ||
341 | |||
342 | /* Peripheral Cluster #6 */ | ||
343 | |||
344 | static DEFINE_PRCC_CLK(6, mtu1_v1, 8, -1, NULL); | ||
345 | static DEFINE_PRCC_CLK(6, mtu0_v1, 7, -1, NULL); | ||
346 | static DEFINE_PRCC_CLK(6, cfgreg_v1, 6, 6, NULL); | ||
347 | static DEFINE_PRCC_CLK(6, dmc_ed, 6, 6, NULL); | ||
348 | static DEFINE_PRCC_CLK(6, hash1, 5, -1, NULL); | ||
349 | static DEFINE_PRCC_CLK(6, unipro_v1, 4, 1, &clk_uniproclk); | ||
350 | static DEFINE_PRCC_CLK(6, cryp1_ed, 4, -1, NULL); | ||
351 | static DEFINE_PRCC_CLK(6, pka, 3, -1, NULL); | ||
352 | static DEFINE_PRCC_CLK(6, hash0, 2, -1, NULL); | ||
353 | static DEFINE_PRCC_CLK(6, cryp0, 1, -1, NULL); | ||
354 | static DEFINE_PRCC_CLK(6, rng_ed, 0, 0, &clk_i2cclk); | ||
355 | static DEFINE_PRCC_CLK(6, rng_v1, 0, 0, &clk_rngclk); | ||
356 | |||
357 | /* Peripheral Cluster #7 */ | ||
358 | |||
359 | static DEFINE_PRCC_CLK(7, tzpc0_ed, 4, -1, NULL); | ||
360 | static DEFINE_PRCC_CLK(7, mtu1_ed, 3, -1, NULL); | ||
361 | static DEFINE_PRCC_CLK(7, mtu0_ed, 2, -1, NULL); | ||
362 | static DEFINE_PRCC_CLK(7, wdg_ed, 1, -1, NULL); | ||
363 | static DEFINE_PRCC_CLK(7, cfgreg_ed, 0, -1, NULL); | ||
364 | |||
365 | static struct clk_lookup u8500_common_clks[] = { | ||
366 | /* Peripheral Cluster #1 */ | ||
367 | CLK(gpio0, "gpio.0", NULL), | ||
368 | CLK(gpio0, "gpio.1", NULL), | ||
369 | CLK(slimbus0, "slimbus0", NULL), | ||
370 | CLK(i2c2, "nmk-i2c.2", NULL), | ||
371 | CLK(sdi0, "sdi0", NULL), | ||
372 | CLK(msp0, "msp0", NULL), | ||
373 | CLK(i2c1, "nmk-i2c.1", NULL), | ||
374 | CLK(uart1, "uart1", NULL), | ||
375 | CLK(uart0, "uart0", NULL), | ||
376 | |||
377 | /* Peripheral Cluster #3 */ | ||
378 | CLK(gpio2, "gpio.2", NULL), | ||
379 | CLK(gpio2, "gpio.3", NULL), | ||
380 | CLK(gpio2, "gpio.4", NULL), | ||
381 | CLK(gpio2, "gpio.5", NULL), | ||
382 | CLK(sdi5, "sdi5", NULL), | ||
383 | CLK(uart2, "uart2", NULL), | ||
384 | CLK(ske, "ske", NULL), | ||
385 | CLK(sdi2, "sdi2", NULL), | ||
386 | CLK(i2c0, "nmk-i2c.0", NULL), | ||
387 | CLK(fsmc, "fsmc", NULL), | ||
388 | |||
389 | /* Peripheral Cluster #5 */ | ||
390 | CLK(gpio3, "gpio.8", NULL), | ||
391 | |||
392 | /* Peripheral Cluster #6 */ | ||
393 | CLK(hash1, "hash1", NULL), | ||
394 | CLK(pka, "pka", NULL), | ||
395 | CLK(hash0, "hash0", NULL), | ||
396 | CLK(cryp0, "cryp0", NULL), | ||
397 | |||
398 | /* PRCMU level clock gating */ | ||
399 | |||
400 | /* Bank 0 */ | ||
401 | CLK(svaclk, "sva", NULL), | ||
402 | CLK(siaclk, "sia", NULL), | ||
403 | CLK(sgaclk, "sga", NULL), | ||
404 | CLK(slimclk, "slim", NULL), | ||
405 | CLK(lcdclk, "lcd", NULL), | ||
406 | CLK(bmlclk, "bml", NULL), | ||
407 | CLK(hsitxclk, "stm-hsi.0", NULL), | ||
408 | CLK(hsirxclk, "stm-hsi.1", NULL), | ||
409 | CLK(hdmiclk, "hdmi", NULL), | ||
410 | CLK(apeatclk, "apeat", NULL), | ||
411 | CLK(apetraceclk, "apetrace", NULL), | ||
412 | CLK(mcdeclk, "mcde", NULL), | ||
413 | CLK(ipi2clk, "ipi2", NULL), | ||
414 | CLK(dmaclk, "dma40", NULL), | ||
415 | CLK(b2r2clk, "b2r2", NULL), | ||
416 | CLK(tvclk, "tv", NULL), | ||
417 | }; | ||
418 | |||
419 | static struct clk_lookup u8500_ed_clks[] = { | ||
420 | /* Peripheral Cluster #1 */ | ||
421 | CLK(spi3_ed, "spi3", NULL), | ||
422 | CLK(msp1_ed, "msp1", NULL), | ||
423 | |||
424 | /* Peripheral Cluster #2 */ | ||
425 | CLK(gpio1_ed, "gpio.6", NULL), | ||
426 | CLK(gpio1_ed, "gpio.7", NULL), | ||
427 | CLK(ssitx_ed, "ssitx", NULL), | ||
428 | CLK(ssirx_ed, "ssirx", NULL), | ||
429 | CLK(spi0_ed, "spi0", NULL), | ||
430 | CLK(sdi3_ed, "sdi3", NULL), | ||
431 | CLK(sdi1_ed, "sdi1", NULL), | ||
432 | CLK(msp2_ed, "msp2", NULL), | ||
433 | CLK(sdi4_ed, "sdi4", NULL), | ||
434 | CLK(pwl_ed, "pwl", NULL), | ||
435 | CLK(spi1_ed, "spi1", NULL), | ||
436 | CLK(spi2_ed, "spi2", NULL), | ||
437 | CLK(i2c3_ed, "nmk-i2c.3", NULL), | ||
438 | |||
439 | /* Peripheral Cluster #3 */ | ||
440 | CLK(ssp1_ed, "ssp1", NULL), | ||
441 | CLK(ssp0_ed, "ssp0", NULL), | ||
442 | |||
443 | /* Peripheral Cluster #5 */ | ||
444 | CLK(usb_ed, "musb_hdrc.0", "usb"), | ||
445 | |||
446 | /* Peripheral Cluster #6 */ | ||
447 | CLK(dmc_ed, "dmc", NULL), | ||
448 | CLK(cryp1_ed, "cryp1", NULL), | ||
449 | CLK(rng_ed, "rng", NULL), | ||
450 | |||
451 | /* Peripheral Cluster #7 */ | ||
452 | CLK(tzpc0_ed, "tzpc0", NULL), | ||
453 | CLK(mtu1_ed, "mtu1", NULL), | ||
454 | CLK(mtu0_ed, "mtu0", NULL), | ||
455 | CLK(wdg_ed, "wdg", NULL), | ||
456 | CLK(cfgreg_ed, "cfgreg", NULL), | ||
457 | }; | ||
458 | |||
459 | static struct clk_lookup u8500_v1_clks[] = { | ||
460 | /* Peripheral Cluster #1 */ | ||
461 | CLK(i2c4, "nmk-i2c.4", NULL), | ||
462 | CLK(spi3_v1, "spi3", NULL), | ||
463 | CLK(msp1_v1, "msp1", NULL), | ||
464 | |||
465 | /* Peripheral Cluster #2 */ | ||
466 | CLK(gpio1_v1, "gpio.6", NULL), | ||
467 | CLK(gpio1_v1, "gpio.7", NULL), | ||
468 | CLK(ssitx_v1, "ssitx", NULL), | ||
469 | CLK(ssirx_v1, "ssirx", NULL), | ||
470 | CLK(spi0_v1, "spi0", NULL), | ||
471 | CLK(sdi3_v1, "sdi3", NULL), | ||
472 | CLK(sdi1_v1, "sdi1", NULL), | ||
473 | CLK(msp2_v1, "msp2", NULL), | ||
474 | CLK(sdi4_v1, "sdi4", NULL), | ||
475 | CLK(pwl_v1, "pwl", NULL), | ||
476 | CLK(spi1_v1, "spi1", NULL), | ||
477 | CLK(spi2_v1, "spi2", NULL), | ||
478 | CLK(i2c3_v1, "nmk-i2c.3", NULL), | ||
479 | |||
480 | /* Peripheral Cluster #3 */ | ||
481 | CLK(ssp1_v1, "ssp1", NULL), | ||
482 | CLK(ssp0_v1, "ssp0", NULL), | ||
483 | |||
484 | /* Peripheral Cluster #5 */ | ||
485 | CLK(usb_v1, "musb_hdrc.0", "usb"), | ||
486 | |||
487 | /* Peripheral Cluster #6 */ | ||
488 | CLK(mtu1_v1, "mtu1", NULL), | ||
489 | CLK(mtu0_v1, "mtu0", NULL), | ||
490 | CLK(cfgreg_v1, "cfgreg", NULL), | ||
491 | CLK(hash1, "hash1", NULL), | ||
492 | CLK(unipro_v1, "unipro", NULL), | ||
493 | CLK(rng_v1, "rng", NULL), | ||
494 | |||
495 | /* PRCMU level clock gating */ | ||
496 | |||
497 | /* Bank 0 */ | ||
498 | CLK(uniproclk, "uniproclk", NULL), | ||
499 | CLK(dsialtclk, "dsialt", NULL), | ||
500 | |||
501 | /* Bank 1 */ | ||
502 | CLK(rngclk, "rng", NULL), | ||
503 | CLK(uiccclk, "uicc", NULL), | ||
84 | }; | 504 | }; |
85 | 505 | ||
86 | static int __init clk_init(void) | 506 | static int __init clk_init(void) |
87 | { | 507 | { |
88 | /* register the clock lookups */ | 508 | if (cpu_is_u8500ed()) { |
89 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | 509 | clk_prcmu_ops.enable = clk_prcmu_ed_enable; |
510 | clk_prcmu_ops.disable = clk_prcmu_ed_disable; | ||
511 | } else if (cpu_is_u5500()) { | ||
512 | /* Clock tree for U5500 not implemented yet */ | ||
513 | clk_prcc_ops.enable = clk_prcc_ops.disable = NULL; | ||
514 | clk_prcmu_ops.enable = clk_prcmu_ops.disable = NULL; | ||
515 | } | ||
516 | |||
517 | clkdev_add_table(u8500_common_clks, ARRAY_SIZE(u8500_common_clks)); | ||
518 | if (cpu_is_u8500ed()) | ||
519 | clkdev_add_table(u8500_ed_clks, ARRAY_SIZE(u8500_ed_clks)); | ||
520 | else | ||
521 | clkdev_add_table(u8500_v1_clks, ARRAY_SIZE(u8500_v1_clks)); | ||
522 | |||
90 | return 0; | 523 | return 0; |
91 | } | 524 | } |
92 | arch_initcall(clk_init); | 525 | arch_initcall(clk_init); |
diff --git a/arch/arm/mach-ux500/clock.h b/arch/arm/mach-ux500/clock.h new file mode 100644 index 000000000000..e4f99b65026f --- /dev/null +++ b/arch/arm/mach-ux500/clock.h | |||
@@ -0,0 +1,125 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 ST-Ericsson | ||
3 | * Copyright (C) 2009 STMicroelectronics | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | /** | ||
11 | * struct clkops - ux500 clock operations | ||
12 | * @enable: function to enable the clock | ||
13 | * @disable: function to disable the clock | ||
14 | * @get_rate: function to get the current clock rate | ||
15 | * | ||
16 | * This structure contains function pointers to functions that will be used to | ||
17 | * control the clock. All of these functions are optional. If get_rate is | ||
18 | * NULL, the rate in the struct clk will be used. | ||
19 | */ | ||
20 | struct clkops { | ||
21 | void (*enable) (struct clk *); | ||
22 | void (*disable) (struct clk *); | ||
23 | unsigned long (*get_rate) (struct clk *); | ||
24 | }; | ||
25 | |||
26 | /** | ||
27 | * struct clk - ux500 clock structure | ||
28 | * @ops: pointer to clkops struct used to control this clock | ||
29 | * @name: name, for debugging | ||
30 | * @enabled: refcount. positive if enabled, zero if disabled | ||
31 | * @rate: fixed rate for clocks which don't implement | ||
32 | * ops->getrate | ||
33 | * @prcmu_cg_off: address offset of the combined enable/disable register | ||
34 | * (used on u8500v1) | ||
35 | * @prcmu_cg_bit: bit in the combined enable/disable register (used on | ||
36 | * u8500v1) | ||
37 | * @prcmu_cg_mgt: address of the enable/disable register (used on | ||
38 | * u8500ed) | ||
39 | * @cluster: peripheral cluster number | ||
40 | * @prcc_bus: bit for the bus clock in the peripheral's CLKRST | ||
41 | * @prcc_kernel: bit for the kernel clock in the peripheral's CLKRST. | ||
42 | * -1 if no kernel clock exists. | ||
43 | * @parent_cluster: pointer to parent's cluster clk struct | ||
44 | * @parent_periph: pointer to parent's peripheral clk struct | ||
45 | * | ||
46 | * Peripherals are organised into clusters, and each cluster has an associated | ||
47 | * bus clock. Some peripherals also have a parent peripheral clock. | ||
48 | * | ||
49 | * In order to enable a clock for a peripheral, we need to enable: | ||
50 | * (1) the parent cluster (bus) clock at the PRCMU level | ||
51 | * (2) the parent peripheral clock (if any) at the PRCMU level | ||
52 | * (3) the peripheral's bus & kernel clock at the PRCC level | ||
53 | * | ||
54 | * (1) and (2) are handled by defining clk structs (DEFINE_PRCMU_CLK) for each | ||
55 | * of the cluster and peripheral clocks, and hooking these as the parents of | ||
56 | * the individual peripheral clocks. | ||
57 | * | ||
58 | * (3) is handled by specifying the bits in the PRCC control registers required | ||
59 | * to enable these clocks and modifying them in the ->enable and | ||
60 | * ->disable callbacks of the peripheral clocks (DEFINE_PRCC_CLK). | ||
61 | * | ||
62 | * This structure describes both the PRCMU-level clocks and PRCC-level clocks. | ||
63 | * The prcmu_* fields are only used for the PRCMU clocks, and the cluster, | ||
64 | * prcc, and parent pointers are only used for the PRCC-level clocks. | ||
65 | */ | ||
66 | struct clk { | ||
67 | const struct clkops *ops; | ||
68 | const char *name; | ||
69 | unsigned int enabled; | ||
70 | |||
71 | unsigned long rate; | ||
72 | struct list_head list; | ||
73 | |||
74 | /* These three are only for PRCMU clks */ | ||
75 | |||
76 | unsigned int prcmu_cg_off; | ||
77 | unsigned int prcmu_cg_bit; | ||
78 | unsigned int prcmu_cg_mgt; | ||
79 | |||
80 | /* The rest are only for PRCC clks */ | ||
81 | |||
82 | int cluster; | ||
83 | unsigned int prcc_bus; | ||
84 | unsigned int prcc_kernel; | ||
85 | |||
86 | struct clk *parent_cluster; | ||
87 | struct clk *parent_periph; | ||
88 | }; | ||
89 | |||
90 | #define DEFINE_PRCMU_CLK(_name, _cg_off, _cg_bit, _reg) \ | ||
91 | struct clk clk_##_name = { \ | ||
92 | .name = #_name, \ | ||
93 | .ops = &clk_prcmu_ops, \ | ||
94 | .prcmu_cg_off = _cg_off, \ | ||
95 | .prcmu_cg_bit = _cg_bit, \ | ||
96 | .prcmu_cg_mgt = PRCM_##_reg##_MGT \ | ||
97 | } | ||
98 | |||
99 | #define DEFINE_PRCMU_CLK_RATE(_name, _cg_off, _cg_bit, _reg, _rate) \ | ||
100 | struct clk clk_##_name = { \ | ||
101 | .name = #_name, \ | ||
102 | .ops = &clk_prcmu_ops, \ | ||
103 | .prcmu_cg_off = _cg_off, \ | ||
104 | .prcmu_cg_bit = _cg_bit, \ | ||
105 | .rate = _rate, \ | ||
106 | .prcmu_cg_mgt = PRCM_##_reg##_MGT \ | ||
107 | } | ||
108 | |||
109 | #define DEFINE_PRCC_CLK(_pclust, _name, _bus_en, _kernel_en, _kernclk) \ | ||
110 | struct clk clk_##_name = { \ | ||
111 | .name = #_name, \ | ||
112 | .ops = &clk_prcc_ops, \ | ||
113 | .cluster = _pclust, \ | ||
114 | .prcc_bus = _bus_en, \ | ||
115 | .prcc_kernel = _kernel_en, \ | ||
116 | .parent_cluster = &clk_per##_pclust##clk, \ | ||
117 | .parent_periph = _kernclk \ | ||
118 | } | ||
119 | |||
120 | #define CLK(_clk, _devname, _conname) \ | ||
121 | { \ | ||
122 | .clk = &clk_##_clk, \ | ||
123 | .dev_id = _devname, \ | ||
124 | .con_id = _conname, \ | ||
125 | } | ||
diff --git a/arch/arm/mach-ux500/cpu-db5500.c b/arch/arm/mach-ux500/cpu-db5500.c new file mode 100644 index 000000000000..6a3ac4539f16 --- /dev/null +++ b/arch/arm/mach-ux500/cpu-db5500.c | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #include <linux/platform_device.h> | ||
9 | #include <linux/amba/bus.h> | ||
10 | #include <linux/io.h> | ||
11 | |||
12 | #include <asm/mach/map.h> | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | #include <mach/devices.h> | ||
16 | #include <mach/setup.h> | ||
17 | |||
18 | static struct map_desc u5500_io_desc[] __initdata = { | ||
19 | __IO_DEV_DESC(U5500_GPIO0_BASE, SZ_4K), | ||
20 | __IO_DEV_DESC(U5500_GPIO1_BASE, SZ_4K), | ||
21 | __IO_DEV_DESC(U5500_GPIO2_BASE, SZ_4K), | ||
22 | __IO_DEV_DESC(U5500_GPIO3_BASE, SZ_4K), | ||
23 | __IO_DEV_DESC(U5500_GPIO4_BASE, SZ_4K), | ||
24 | }; | ||
25 | |||
26 | static struct platform_device *u5500_platform_devs[] __initdata = { | ||
27 | &u5500_gpio_devs[0], | ||
28 | &u5500_gpio_devs[1], | ||
29 | &u5500_gpio_devs[2], | ||
30 | &u5500_gpio_devs[3], | ||
31 | &u5500_gpio_devs[4], | ||
32 | &u5500_gpio_devs[5], | ||
33 | &u5500_gpio_devs[6], | ||
34 | &u5500_gpio_devs[7], | ||
35 | }; | ||
36 | |||
37 | void __init u5500_map_io(void) | ||
38 | { | ||
39 | ux500_map_io(); | ||
40 | |||
41 | iotable_init(u5500_io_desc, ARRAY_SIZE(u5500_io_desc)); | ||
42 | } | ||
43 | |||
44 | void __init u5500_init_devices(void) | ||
45 | { | ||
46 | ux500_init_devices(); | ||
47 | |||
48 | platform_add_devices(u5500_platform_devs, | ||
49 | ARRAY_SIZE(u5500_platform_devs)); | ||
50 | } | ||
diff --git a/arch/arm/mach-ux500/cpu-u8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 397bc1f9ed94..d04299f3b6b5 100644 --- a/arch/arm/mach-ux500/cpu-u8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c | |||
@@ -13,44 +13,55 @@ | |||
13 | #include <linux/device.h> | 13 | #include <linux/device.h> |
14 | #include <linux/amba/bus.h> | 14 | #include <linux/amba/bus.h> |
15 | #include <linux/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <linux/gpio.h> | ||
16 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/io.h> | ||
17 | 19 | ||
18 | #include <asm/hardware/gic.h> | ||
19 | #include <asm/mach/map.h> | 20 | #include <asm/mach/map.h> |
20 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
22 | #include <mach/setup.h> | ||
23 | #include <mach/devices.h> | ||
21 | 24 | ||
22 | /* add any platform devices here - TODO */ | ||
23 | static struct platform_device *platform_devs[] __initdata = { | 25 | static struct platform_device *platform_devs[] __initdata = { |
24 | /* yet to be added, add i2c0, gpio.. */ | 26 | &u8500_gpio_devs[0], |
27 | &u8500_gpio_devs[1], | ||
28 | &u8500_gpio_devs[2], | ||
29 | &u8500_gpio_devs[3], | ||
30 | &u8500_gpio_devs[4], | ||
31 | &u8500_gpio_devs[5], | ||
32 | &u8500_gpio_devs[6], | ||
33 | &u8500_gpio_devs[7], | ||
34 | &u8500_gpio_devs[8], | ||
25 | }; | 35 | }; |
26 | 36 | ||
27 | #define __IO_DEV_DESC(x, sz) { \ | ||
28 | .virtual = IO_ADDRESS(x), \ | ||
29 | .pfn = __phys_to_pfn(x), \ | ||
30 | .length = sz, \ | ||
31 | .type = MT_DEVICE, \ | ||
32 | } | ||
33 | |||
34 | /* minimum static i/o mapping required to boot U8500 platforms */ | 37 | /* minimum static i/o mapping required to boot U8500 platforms */ |
35 | static struct map_desc u8500_io_desc[] __initdata = { | 38 | static struct map_desc u8500_io_desc[] __initdata = { |
36 | __IO_DEV_DESC(U8500_UART2_BASE, SZ_4K), | 39 | __IO_DEV_DESC(U8500_PRCMU_BASE, SZ_4K), |
37 | __IO_DEV_DESC(U8500_GIC_CPU_BASE, SZ_4K), | 40 | __IO_DEV_DESC(U8500_GPIO0_BASE, SZ_4K), |
38 | __IO_DEV_DESC(U8500_GIC_DIST_BASE, SZ_4K), | 41 | __IO_DEV_DESC(U8500_GPIO1_BASE, SZ_4K), |
42 | __IO_DEV_DESC(U8500_GPIO2_BASE, SZ_4K), | ||
43 | __IO_DEV_DESC(U8500_GPIO3_BASE, SZ_4K), | ||
44 | }; | ||
45 | |||
46 | static struct map_desc u8500ed_io_desc[] __initdata = { | ||
47 | __IO_DEV_DESC(U8500_MTU0_BASE_ED, SZ_4K), | ||
48 | __IO_DEV_DESC(U8500_CLKRST7_BASE_ED, SZ_8K), | ||
49 | }; | ||
50 | |||
51 | static struct map_desc u8500v1_io_desc[] __initdata = { | ||
39 | __IO_DEV_DESC(U8500_MTU0_BASE, SZ_4K), | 52 | __IO_DEV_DESC(U8500_MTU0_BASE, SZ_4K), |
40 | __IO_DEV_DESC(U8500_TWD_BASE, SZ_4K), | ||
41 | __IO_DEV_DESC(U8500_SCU_BASE, SZ_4K), | ||
42 | __IO_DEV_DESC(U8500_BACKUPRAM0_BASE, SZ_8K), | ||
43 | }; | 53 | }; |
44 | 54 | ||
45 | void __init u8500_map_io(void) | 55 | void __init u8500_map_io(void) |
46 | { | 56 | { |
57 | ux500_map_io(); | ||
58 | |||
47 | iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); | 59 | iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc)); |
48 | } | ||
49 | 60 | ||
50 | void __init u8500_init_irq(void) | 61 | if (cpu_is_u8500ed()) |
51 | { | 62 | iotable_init(u8500ed_io_desc, ARRAY_SIZE(u8500ed_io_desc)); |
52 | gic_dist_init(0, __io_address(U8500_GIC_DIST_BASE), 29); | 63 | else |
53 | gic_cpu_init(0, __io_address(U8500_GIC_CPU_BASE)); | 64 | iotable_init(u8500v1_io_desc, ARRAY_SIZE(u8500v1_io_desc)); |
54 | } | 65 | } |
55 | 66 | ||
56 | /* | 67 | /* |
@@ -58,6 +69,8 @@ void __init u8500_init_irq(void) | |||
58 | */ | 69 | */ |
59 | void __init u8500_init_devices(void) | 70 | void __init u8500_init_devices(void) |
60 | { | 71 | { |
72 | ux500_init_devices(); | ||
73 | |||
61 | /* Register the platform devices */ | 74 | /* Register the platform devices */ |
62 | platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); | 75 | platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); |
63 | 76 | ||
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c new file mode 100644 index 000000000000..d81ad023963c --- /dev/null +++ b/arch/arm/mach-ux500/cpu.c | |||
@@ -0,0 +1,99 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #include <linux/platform_device.h> | ||
9 | #include <linux/amba/bus.h> | ||
10 | #include <linux/io.h> | ||
11 | #include <linux/clk.h> | ||
12 | |||
13 | #include <asm/hardware/cache-l2x0.h> | ||
14 | #include <asm/hardware/gic.h> | ||
15 | #include <asm/mach/map.h> | ||
16 | #include <asm/localtimer.h> | ||
17 | |||
18 | #include <plat/mtu.h> | ||
19 | #include <mach/hardware.h> | ||
20 | #include <mach/setup.h> | ||
21 | #include <mach/devices.h> | ||
22 | |||
23 | #include "clock.h" | ||
24 | |||
25 | static struct map_desc ux500_io_desc[] __initdata = { | ||
26 | __IO_DEV_DESC(UX500_UART0_BASE, SZ_4K), | ||
27 | __IO_DEV_DESC(UX500_UART2_BASE, SZ_4K), | ||
28 | |||
29 | __IO_DEV_DESC(UX500_GIC_CPU_BASE, SZ_4K), | ||
30 | __IO_DEV_DESC(UX500_GIC_DIST_BASE, SZ_4K), | ||
31 | __IO_DEV_DESC(UX500_L2CC_BASE, SZ_4K), | ||
32 | __IO_DEV_DESC(UX500_TWD_BASE, SZ_4K), | ||
33 | __IO_DEV_DESC(UX500_SCU_BASE, SZ_4K), | ||
34 | |||
35 | __IO_DEV_DESC(UX500_CLKRST1_BASE, SZ_4K), | ||
36 | __IO_DEV_DESC(UX500_CLKRST2_BASE, SZ_4K), | ||
37 | __IO_DEV_DESC(UX500_CLKRST3_BASE, SZ_4K), | ||
38 | __IO_DEV_DESC(UX500_CLKRST5_BASE, SZ_4K), | ||
39 | __IO_DEV_DESC(UX500_CLKRST6_BASE, SZ_4K), | ||
40 | |||
41 | __IO_DEV_DESC(UX500_MTU0_BASE, SZ_4K), | ||
42 | __IO_DEV_DESC(UX500_MTU1_BASE, SZ_4K), | ||
43 | |||
44 | __IO_DEV_DESC(UX500_BACKUPRAM0_BASE, SZ_8K), | ||
45 | }; | ||
46 | |||
47 | static struct amba_device *ux500_amba_devs[] __initdata = { | ||
48 | &ux500_pl031_device, | ||
49 | }; | ||
50 | |||
51 | void __init ux500_map_io(void) | ||
52 | { | ||
53 | iotable_init(ux500_io_desc, ARRAY_SIZE(ux500_io_desc)); | ||
54 | } | ||
55 | |||
56 | void __init ux500_init_devices(void) | ||
57 | { | ||
58 | amba_add_devices(ux500_amba_devs, ARRAY_SIZE(ux500_amba_devs)); | ||
59 | } | ||
60 | |||
61 | void __init ux500_init_irq(void) | ||
62 | { | ||
63 | gic_dist_init(0, __io_address(UX500_GIC_DIST_BASE), 29); | ||
64 | gic_cpu_init(0, __io_address(UX500_GIC_CPU_BASE)); | ||
65 | } | ||
66 | |||
67 | #ifdef CONFIG_CACHE_L2X0 | ||
68 | static int ux500_l2x0_init(void) | ||
69 | { | ||
70 | void __iomem *l2x0_base; | ||
71 | |||
72 | l2x0_base = __io_address(UX500_L2CC_BASE); | ||
73 | |||
74 | /* 64KB way size, 8 way associativity, force WA */ | ||
75 | l2x0_init(l2x0_base, 0x3e060000, 0xc0000fff); | ||
76 | |||
77 | return 0; | ||
78 | } | ||
79 | early_initcall(ux500_l2x0_init); | ||
80 | #endif | ||
81 | |||
82 | static void __init ux500_timer_init(void) | ||
83 | { | ||
84 | #ifdef CONFIG_LOCAL_TIMERS | ||
85 | /* Setup the local timer base */ | ||
86 | twd_base = __io_address(UX500_TWD_BASE); | ||
87 | #endif | ||
88 | /* Setup the MTU base */ | ||
89 | if (cpu_is_u8500ed()) | ||
90 | mtu_base = __io_address(U8500_MTU0_BASE_ED); | ||
91 | else | ||
92 | mtu_base = __io_address(UX500_MTU0_BASE); | ||
93 | |||
94 | nmdk_timer_init(); | ||
95 | } | ||
96 | |||
97 | struct sys_timer ux500_timer = { | ||
98 | .init = ux500_timer_init, | ||
99 | }; | ||
diff --git a/arch/arm/mach-ux500/devices-db5500.c b/arch/arm/mach-ux500/devices-db5500.c new file mode 100644 index 000000000000..33e5b56bebb6 --- /dev/null +++ b/arch/arm/mach-ux500/devices-db5500.c | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #include <linux/platform_device.h> | ||
9 | #include <linux/interrupt.h> | ||
10 | #include <linux/gpio.h> | ||
11 | |||
12 | #include <mach/hardware.h> | ||
13 | #include <mach/devices.h> | ||
14 | |||
15 | static struct nmk_gpio_platform_data u5500_gpio_data[] = { | ||
16 | GPIO_DATA("GPIO-0-31", 0), | ||
17 | GPIO_DATA("GPIO-32-63", 32), /* 36..63 not routed to pin */ | ||
18 | GPIO_DATA("GPIO-64-95", 64), /* 83..95 not routed to pin */ | ||
19 | GPIO_DATA("GPIO-96-127", 96), /* 102..127 not routed to pin */ | ||
20 | GPIO_DATA("GPIO-128-159", 128), /* 149..159 not routed to pin */ | ||
21 | GPIO_DATA("GPIO-160-191", 160), | ||
22 | GPIO_DATA("GPIO-192-223", 192), | ||
23 | GPIO_DATA("GPIO-224-255", 224), /* 228..255 not routed to pin */ | ||
24 | }; | ||
25 | |||
26 | static struct resource u5500_gpio_resources[] = { | ||
27 | GPIO_RESOURCE(0), | ||
28 | GPIO_RESOURCE(1), | ||
29 | GPIO_RESOURCE(2), | ||
30 | GPIO_RESOURCE(3), | ||
31 | GPIO_RESOURCE(4), | ||
32 | GPIO_RESOURCE(5), | ||
33 | GPIO_RESOURCE(6), | ||
34 | GPIO_RESOURCE(7), | ||
35 | }; | ||
36 | |||
37 | struct platform_device u5500_gpio_devs[] = { | ||
38 | GPIO_DEVICE(0), | ||
39 | GPIO_DEVICE(1), | ||
40 | GPIO_DEVICE(2), | ||
41 | GPIO_DEVICE(3), | ||
42 | GPIO_DEVICE(4), | ||
43 | GPIO_DEVICE(5), | ||
44 | GPIO_DEVICE(6), | ||
45 | GPIO_DEVICE(7), | ||
46 | }; | ||
diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c new file mode 100644 index 000000000000..20334236afce --- /dev/null +++ b/arch/arm/mach-ux500/devices-db8500.c | |||
@@ -0,0 +1,107 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/platform_device.h> | ||
10 | #include <linux/interrupt.h> | ||
11 | #include <linux/io.h> | ||
12 | #include <linux/gpio.h> | ||
13 | #include <linux/amba/bus.h> | ||
14 | |||
15 | #include <mach/hardware.h> | ||
16 | #include <mach/setup.h> | ||
17 | |||
18 | static struct nmk_gpio_platform_data u8500_gpio_data[] = { | ||
19 | GPIO_DATA("GPIO-0-31", 0), | ||
20 | GPIO_DATA("GPIO-32-63", 32), /* 37..63 not routed to pin */ | ||
21 | GPIO_DATA("GPIO-64-95", 64), | ||
22 | GPIO_DATA("GPIO-96-127", 96), /* 98..127 not routed to pin */ | ||
23 | GPIO_DATA("GPIO-128-159", 128), | ||
24 | GPIO_DATA("GPIO-160-191", 160), /* 172..191 not routed to pin */ | ||
25 | GPIO_DATA("GPIO-192-223", 192), | ||
26 | GPIO_DATA("GPIO-224-255", 224), /* 231..255 not routed to pin */ | ||
27 | GPIO_DATA("GPIO-256-288", 256), /* 268..288 not routed to pin */ | ||
28 | }; | ||
29 | |||
30 | static struct resource u8500_gpio_resources[] = { | ||
31 | GPIO_RESOURCE(0), | ||
32 | GPIO_RESOURCE(1), | ||
33 | GPIO_RESOURCE(2), | ||
34 | GPIO_RESOURCE(3), | ||
35 | GPIO_RESOURCE(4), | ||
36 | GPIO_RESOURCE(5), | ||
37 | GPIO_RESOURCE(6), | ||
38 | GPIO_RESOURCE(7), | ||
39 | GPIO_RESOURCE(8), | ||
40 | }; | ||
41 | |||
42 | struct platform_device u8500_gpio_devs[] = { | ||
43 | GPIO_DEVICE(0), | ||
44 | GPIO_DEVICE(1), | ||
45 | GPIO_DEVICE(2), | ||
46 | GPIO_DEVICE(3), | ||
47 | GPIO_DEVICE(4), | ||
48 | GPIO_DEVICE(5), | ||
49 | GPIO_DEVICE(6), | ||
50 | GPIO_DEVICE(7), | ||
51 | GPIO_DEVICE(8), | ||
52 | }; | ||
53 | |||
54 | struct amba_device u8500_ssp0_device = { | ||
55 | .dev = { | ||
56 | .coherent_dma_mask = ~0, | ||
57 | .init_name = "ssp0", | ||
58 | }, | ||
59 | .res = { | ||
60 | .start = U8500_SSP0_BASE, | ||
61 | .end = U8500_SSP0_BASE + SZ_4K - 1, | ||
62 | .flags = IORESOURCE_MEM, | ||
63 | }, | ||
64 | .irq = {IRQ_SSP0, NO_IRQ }, | ||
65 | /* ST-Ericsson modified id */ | ||
66 | .periphid = SSP_PER_ID, | ||
67 | }; | ||
68 | |||
69 | static struct resource u8500_i2c0_resources[] = { | ||
70 | [0] = { | ||
71 | .start = U8500_I2C0_BASE, | ||
72 | .end = U8500_I2C0_BASE + SZ_4K - 1, | ||
73 | .flags = IORESOURCE_MEM, | ||
74 | }, | ||
75 | [1] = { | ||
76 | .start = IRQ_I2C0, | ||
77 | .end = IRQ_I2C0, | ||
78 | .flags = IORESOURCE_IRQ, | ||
79 | } | ||
80 | }; | ||
81 | |||
82 | struct platform_device u8500_i2c0_device = { | ||
83 | .name = "nmk-i2c", | ||
84 | .id = 0, | ||
85 | .resource = u8500_i2c0_resources, | ||
86 | .num_resources = ARRAY_SIZE(u8500_i2c0_resources), | ||
87 | }; | ||
88 | |||
89 | static struct resource u8500_i2c4_resources[] = { | ||
90 | [0] = { | ||
91 | .start = U8500_I2C4_BASE, | ||
92 | .end = U8500_I2C4_BASE + SZ_4K - 1, | ||
93 | .flags = IORESOURCE_MEM, | ||
94 | }, | ||
95 | [1] = { | ||
96 | .start = IRQ_I2C4, | ||
97 | .end = IRQ_I2C4, | ||
98 | .flags = IORESOURCE_IRQ, | ||
99 | } | ||
100 | }; | ||
101 | |||
102 | struct platform_device u8500_i2c4_device = { | ||
103 | .name = "nmk-i2c", | ||
104 | .id = 4, | ||
105 | .resource = u8500_i2c4_resources, | ||
106 | .num_resources = ARRAY_SIZE(u8500_i2c4_resources), | ||
107 | }; | ||
diff --git a/arch/arm/mach-ux500/devices.c b/arch/arm/mach-ux500/devices.c new file mode 100644 index 000000000000..8a268893cb7f --- /dev/null +++ b/arch/arm/mach-ux500/devices.c | |||
@@ -0,0 +1,88 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * Author: Rabin Vincent <rabin.vincent@stericsson.com> for ST-Ericsson | ||
5 | * License terms: GNU General Public License (GPL) version 2 | ||
6 | */ | ||
7 | |||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/platform_device.h> | ||
10 | #include <linux/interrupt.h> | ||
11 | #include <linux/io.h> | ||
12 | #include <linux/amba/bus.h> | ||
13 | |||
14 | #include <mach/hardware.h> | ||
15 | #include <mach/setup.h> | ||
16 | |||
17 | #define __MEM_4K_RESOURCE(x) \ | ||
18 | .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM} | ||
19 | |||
20 | struct amba_device ux500_pl031_device = { | ||
21 | .dev = { | ||
22 | .init_name = "pl031", | ||
23 | }, | ||
24 | .res = { | ||
25 | .start = UX500_RTC_BASE, | ||
26 | .end = UX500_RTC_BASE + SZ_4K - 1, | ||
27 | .flags = IORESOURCE_MEM, | ||
28 | }, | ||
29 | .irq = {IRQ_RTC_RTT, NO_IRQ}, | ||
30 | }; | ||
31 | |||
32 | struct amba_device ux500_uart0_device = { | ||
33 | .dev = { .init_name = "uart0" }, | ||
34 | __MEM_4K_RESOURCE(UX500_UART0_BASE), | ||
35 | .irq = {IRQ_UART0, NO_IRQ}, | ||
36 | }; | ||
37 | |||
38 | struct amba_device ux500_uart1_device = { | ||
39 | .dev = { .init_name = "uart1" }, | ||
40 | __MEM_4K_RESOURCE(UX500_UART1_BASE), | ||
41 | .irq = {IRQ_UART1, NO_IRQ}, | ||
42 | }; | ||
43 | |||
44 | struct amba_device ux500_uart2_device = { | ||
45 | .dev = { .init_name = "uart2" }, | ||
46 | __MEM_4K_RESOURCE(UX500_UART2_BASE), | ||
47 | .irq = {IRQ_UART2, NO_IRQ}, | ||
48 | }; | ||
49 | |||
50 | #define UX500_I2C_RESOURCES(id, size) \ | ||
51 | static struct resource ux500_i2c##id##_resources[] = { \ | ||
52 | [0] = { \ | ||
53 | .start = UX500_I2C##id##_BASE, \ | ||
54 | .end = UX500_I2C##id##_BASE + size - 1, \ | ||
55 | .flags = IORESOURCE_MEM, \ | ||
56 | }, \ | ||
57 | [1] = { \ | ||
58 | .start = IRQ_I2C##id, \ | ||
59 | .end = IRQ_I2C##id, \ | ||
60 | .flags = IORESOURCE_IRQ \ | ||
61 | } \ | ||
62 | } | ||
63 | |||
64 | UX500_I2C_RESOURCES(1, SZ_4K); | ||
65 | UX500_I2C_RESOURCES(2, SZ_4K); | ||
66 | UX500_I2C_RESOURCES(3, SZ_4K); | ||
67 | |||
68 | #define UX500_I2C_PDEVICE(cid) \ | ||
69 | struct platform_device ux500_i2c##cid##_device = { \ | ||
70 | .name = "nmk-i2c", \ | ||
71 | .id = cid, \ | ||
72 | .num_resources = 2, \ | ||
73 | .resource = ux500_i2c##cid##_resources, \ | ||
74 | } | ||
75 | |||
76 | UX500_I2C_PDEVICE(1); | ||
77 | UX500_I2C_PDEVICE(2); | ||
78 | UX500_I2C_PDEVICE(3); | ||
79 | |||
80 | void __init amba_add_devices(struct amba_device *devs[], int num) | ||
81 | { | ||
82 | int i; | ||
83 | |||
84 | for (i = 0; i < num; i++) { | ||
85 | struct amba_device *d = devs[i]; | ||
86 | amba_device_register(d, &iomem_resource); | ||
87 | } | ||
88 | } | ||
diff --git a/arch/arm/mach-ux500/include/mach/db5500-regs.h b/arch/arm/mach-ux500/include/mach/db5500-regs.h new file mode 100644 index 000000000000..545c80fc8024 --- /dev/null +++ b/arch/arm/mach-ux500/include/mach/db5500-regs.h | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __MACH_DB5500_REGS_H | ||
8 | #define __MACH_DB5500_REGS_H | ||
9 | |||
10 | #define U5500_PER1_BASE 0xA0020000 | ||
11 | #define U5500_PER2_BASE 0xA0010000 | ||
12 | #define U5500_PER3_BASE 0x80140000 | ||
13 | #define U5500_PER4_BASE 0x80150000 | ||
14 | #define U5500_PER5_BASE 0x80100000 | ||
15 | #define U5500_PER6_BASE 0x80120000 | ||
16 | |||
17 | #define U5500_GIC_DIST_BASE 0xA0411000 | ||
18 | #define U5500_GIC_CPU_BASE 0xA0410100 | ||
19 | #define U5500_DMA_BASE 0x90030000 | ||
20 | #define U5500_MCDE_BASE 0xA0400000 | ||
21 | #define U5500_MODEM_BASE 0xB0000000 | ||
22 | #define U5500_L2CC_BASE 0xA0412000 | ||
23 | #define U5500_SCU_BASE 0xA0410000 | ||
24 | #define U5500_DSI1_BASE 0xA0401000 | ||
25 | #define U5500_DSI2_BASE 0xA0402000 | ||
26 | #define U5500_SIA_BASE 0xA0100000 | ||
27 | #define U5500_SVA_BASE 0x80200000 | ||
28 | #define U5500_HSEM_BASE 0xA0000000 | ||
29 | #define U5500_NAND0_BASE 0x60000000 | ||
30 | #define U5500_NAND1_BASE 0x70000000 | ||
31 | #define U5500_TWD_BASE 0xa0410600 | ||
32 | #define U5500_B2R2_BASE 0xa0200000 | ||
33 | |||
34 | #define U5500_FSMC_BASE (U5500_PER1_BASE + 0x0000) | ||
35 | #define U5500_SDI0_BASE (U5500_PER1_BASE + 0x1000) | ||
36 | #define U5500_SDI2_BASE (U5500_PER1_BASE + 0x2000) | ||
37 | #define U5500_UART0_BASE (U5500_PER1_BASE + 0x3000) | ||
38 | #define U5500_I2C1_BASE (U5500_PER1_BASE + 0x4000) | ||
39 | #define U5500_MSP0_BASE (U5500_PER1_BASE + 0x5000) | ||
40 | #define U5500_GPIO0_BASE (U5500_PER1_BASE + 0xE000) | ||
41 | #define U5500_CLKRST1_BASE (U5500_PER1_BASE + 0xF000) | ||
42 | |||
43 | #define U5500_USBOTG_BASE (U5500_PER2_BASE + 0x0000) | ||
44 | #define U5500_GPIO1_BASE (U5500_PER2_BASE + 0xE000) | ||
45 | #define U5500_CLKRST2_BASE (U5500_PER2_BASE + 0xF000) | ||
46 | |||
47 | #define U5500_KEYPAD_BASE (U5500_PER3_BASE + 0x0000) | ||
48 | #define U5500_PWM_BASE (U5500_PER3_BASE + 0x1000) | ||
49 | #define U5500_GPIO3_BASE (U5500_PER3_BASE + 0xE000) | ||
50 | #define U5500_CLKRST3_BASE (U5500_PER3_BASE + 0xF000) | ||
51 | |||
52 | #define U5500_BACKUPRAM0_BASE (U5500_PER4_BASE + 0x0000) | ||
53 | #define U5500_BACKUPRAM1_BASE (U5500_PER4_BASE + 0x1000) | ||
54 | #define U5500_RTT0_BASE (U5500_PER4_BASE + 0x2000) | ||
55 | #define U5500_RTT1_BASE (U5500_PER4_BASE + 0x3000) | ||
56 | #define U5500_RTC_BASE (U5500_PER4_BASE + 0x4000) | ||
57 | #define U5500_SCR_BASE (U5500_PER4_BASE + 0x5000) | ||
58 | #define U5500_DMC_BASE (U5500_PER4_BASE + 0x6000) | ||
59 | #define U5500_PRCMU_BASE (U5500_PER4_BASE + 0x7000) | ||
60 | #define U5500_MSP1_BASE (U5500_PER4_BASE + 0x9000) | ||
61 | #define U5500_GPIO2_BASE (U5500_PER4_BASE + 0xA000) | ||
62 | #define U5500_CDETECT_BASE (U5500_PER4_BASE + 0xF000) | ||
63 | |||
64 | #define U5500_SPI0_BASE (U5500_PER5_BASE + 0x0000) | ||
65 | #define U5500_SPI1_BASE (U5500_PER5_BASE + 0x1000) | ||
66 | #define U5500_SPI2_BASE (U5500_PER5_BASE + 0x2000) | ||
67 | #define U5500_SPI3_BASE (U5500_PER5_BASE + 0x3000) | ||
68 | #define U5500_UART1_BASE (U5500_PER5_BASE + 0x4000) | ||
69 | #define U5500_UART2_BASE (U5500_PER5_BASE + 0x5000) | ||
70 | #define U5500_UART3_BASE (U5500_PER5_BASE + 0x6000) | ||
71 | #define U5500_SDI1_BASE (U5500_PER5_BASE + 0x7000) | ||
72 | #define U5500_SDI3_BASE (U5500_PER5_BASE + 0x8000) | ||
73 | #define U5500_SDI4_BASE (U5500_PER5_BASE + 0x9000) | ||
74 | #define U5500_I2C2_BASE (U5500_PER5_BASE + 0xA000) | ||
75 | #define U5500_I2C3_BASE (U5500_PER5_BASE + 0xB000) | ||
76 | #define U5500_MSP2_BASE (U5500_PER5_BASE + 0xC000) | ||
77 | #define U5500_IRDA_BASE (U5500_PER5_BASE + 0xD000) | ||
78 | #define U5500_IRRC_BASE (U5500_PER5_BASE + 0x10000) | ||
79 | #define U5500_GPIO4_BASE (U5500_PER5_BASE + 0x1E000) | ||
80 | #define U5500_CLKRST5_BASE (U5500_PER5_BASE + 0x1F000) | ||
81 | |||
82 | #define U5500_RNG_BASE (U5500_PER6_BASE + 0x0000) | ||
83 | #define U5500_HASH0_BASE (U5500_PER6_BASE + 0x1000) | ||
84 | #define U5500_HASH1_BASE (U5500_PER6_BASE + 0x2000) | ||
85 | #define U5500_PKA_BASE (U5500_PER6_BASE + 0x4000) | ||
86 | #define U5500_PKAM_BASE (U5500_PER6_BASE + 0x5000) | ||
87 | #define U5500_MTU0_BASE (U5500_PER6_BASE + 0x6000) | ||
88 | #define U5500_MTU1_BASE (U5500_PER6_BASE + 0x7000) | ||
89 | #define U5500_CR_BASE (U5500_PER6_BASE + 0x8000) | ||
90 | #define U5500_CRYP0_BASE (U5500_PER6_BASE + 0xA000) | ||
91 | #define U5500_CRYP1_BASE (U5500_PER6_BASE + 0xB000) | ||
92 | #define U5500_CLKRST6_BASE (U5500_PER6_BASE + 0xF000) | ||
93 | |||
94 | #define U5500_GPIOBANK0_BASE U5500_GPIO0_BASE | ||
95 | #define U5500_GPIOBANK1_BASE (U5500_GPIO0_BASE + 0x80) | ||
96 | #define U5500_GPIOBANK2_BASE U5500_GPIO1_BASE | ||
97 | #define U5500_GPIOBANK3_BASE U5500_GPIO2_BASE | ||
98 | #define U5500_GPIOBANK4_BASE U5500_GPIO3_BASE | ||
99 | #define U5500_GPIOBANK5_BASE U5500_GPIO4_BASE | ||
100 | #define U5500_GPIOBANK6_BASE (U5500_GPIO4_BASE + 0x80) | ||
101 | #define U5500_GPIOBANK7_BASE (U5500_GPIO4_BASE + 0x100) | ||
102 | |||
103 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/db8500-regs.h b/arch/arm/mach-ux500/include/mach/db8500-regs.h new file mode 100644 index 000000000000..9169e1e382a3 --- /dev/null +++ b/arch/arm/mach-ux500/include/mach/db8500-regs.h | |||
@@ -0,0 +1,135 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __MACH_DB8500_REGS_H | ||
8 | #define __MACH_DB8500_REGS_H | ||
9 | |||
10 | #define U8500_PER3_BASE 0x80000000 | ||
11 | #define U8500_STM_BASE 0x80100000 | ||
12 | #define U8500_STM_REG_BASE (U8500_STM_BASE + 0xF000) | ||
13 | #define U8500_PER2_BASE 0x80110000 | ||
14 | #define U8500_PER1_BASE 0x80120000 | ||
15 | #define U8500_B2R2_BASE 0x80130000 | ||
16 | #define U8500_HSEM_BASE 0x80140000 | ||
17 | #define U8500_PER4_BASE 0x80150000 | ||
18 | #define U8500_ICN_BASE 0x81000000 | ||
19 | |||
20 | #define U8500_BOOT_ROM_BASE 0x90000000 | ||
21 | /* ASIC ID is at 0xff4 offset within this region */ | ||
22 | #define U8500_ASIC_ID_BASE 0x9001F000 | ||
23 | |||
24 | #define U8500_PER6_BASE 0xa03c0000 | ||
25 | #define U8500_PER5_BASE 0xa03e0000 | ||
26 | #define U8500_PER7_BASE_ED 0xa03d0000 | ||
27 | |||
28 | #define U8500_SVA_BASE 0xa0100000 | ||
29 | #define U8500_SIA_BASE 0xa0200000 | ||
30 | |||
31 | #define U8500_SGA_BASE 0xa0300000 | ||
32 | #define U8500_MCDE_BASE 0xa0350000 | ||
33 | #define U8500_DMA_BASE_ED 0xa0362000 | ||
34 | #define U8500_DMA_BASE 0x801C0000 /* v1 */ | ||
35 | |||
36 | #define U8500_SBAG_BASE 0xa0390000 | ||
37 | |||
38 | #define U8500_SCU_BASE 0xa0410000 | ||
39 | #define U8500_GIC_CPU_BASE 0xa0410100 | ||
40 | #define U8500_TWD_BASE 0xa0410600 | ||
41 | #define U8500_GIC_DIST_BASE 0xa0411000 | ||
42 | #define U8500_L2CC_BASE 0xa0412000 | ||
43 | |||
44 | #define U8500_MODEM_I2C 0xb7e02000 | ||
45 | |||
46 | #define U8500_GPIO0_BASE (U8500_PER1_BASE + 0xE000) | ||
47 | #define U8500_GPIO1_BASE (U8500_PER3_BASE + 0xE000) | ||
48 | #define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xE000) | ||
49 | #define U8500_GPIO3_BASE (U8500_PER5_BASE + 0x1E000) | ||
50 | |||
51 | /* per7 base addressess */ | ||
52 | #define U8500_CR_BASE_ED (U8500_PER7_BASE_ED + 0x8000) | ||
53 | #define U8500_MTU0_BASE_ED (U8500_PER7_BASE_ED + 0xa000) | ||
54 | #define U8500_MTU1_BASE_ED (U8500_PER7_BASE_ED + 0xb000) | ||
55 | #define U8500_TZPC0_BASE_ED (U8500_PER7_BASE_ED + 0xc000) | ||
56 | #define U8500_CLKRST7_BASE_ED (U8500_PER7_BASE_ED + 0xf000) | ||
57 | |||
58 | #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) | ||
59 | #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) | ||
60 | |||
61 | /* per6 base addressess */ | ||
62 | #define U8500_RNG_BASE (U8500_PER6_BASE + 0x0000) | ||
63 | #define U8500_PKA_BASE (U8500_PER6_BASE + 0x1000) | ||
64 | #define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000) | ||
65 | #define U8500_MTU0_BASE (U8500_PER6_BASE + 0x6000) /* v1 */ | ||
66 | #define U8500_MTU1_BASE (U8500_PER6_BASE + 0x7000) /* v1 */ | ||
67 | #define U8500_CR_BASE (U8500_PER6_BASE + 0x8000) /* v1 */ | ||
68 | #define U8500_CRYPTO0_BASE (U8500_PER6_BASE + 0xa000) | ||
69 | #define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000) | ||
70 | #define U8500_CLKRST6_BASE (U8500_PER6_BASE + 0xf000) | ||
71 | |||
72 | /* per5 base addressess */ | ||
73 | #define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000) | ||
74 | #define U8500_CLKRST5_BASE (U8500_PER5_BASE + 0x1f000) | ||
75 | |||
76 | /* per4 base addressess */ | ||
77 | #define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x00000) | ||
78 | #define U8500_BACKUPRAM1_BASE (U8500_PER4_BASE + 0x01000) | ||
79 | #define U8500_RTT0_BASE (U8500_PER4_BASE + 0x02000) | ||
80 | #define U8500_RTT1_BASE (U8500_PER4_BASE + 0x03000) | ||
81 | #define U8500_RTC_BASE (U8500_PER4_BASE + 0x04000) | ||
82 | #define U8500_SCR_BASE (U8500_PER4_BASE + 0x05000) | ||
83 | #define U8500_DMC_BASE (U8500_PER4_BASE + 0x06000) | ||
84 | #define U8500_PRCMU_BASE (U8500_PER4_BASE + 0x07000) | ||
85 | #define U8500_PRCMU_TCDM_BASE (U8500_PER4_BASE + 0x0f000) | ||
86 | |||
87 | /* per3 base addresses */ | ||
88 | #define U8500_FSMC_BASE (U8500_PER3_BASE + 0x0000) | ||
89 | #define U8500_SSP0_BASE (U8500_PER3_BASE + 0x2000) | ||
90 | #define U8500_SSP1_BASE (U8500_PER3_BASE + 0x3000) | ||
91 | #define U8500_I2C0_BASE (U8500_PER3_BASE + 0x4000) | ||
92 | #define U8500_SDI2_BASE (U8500_PER3_BASE + 0x5000) | ||
93 | #define U8500_SKE_BASE (U8500_PER3_BASE + 0x6000) | ||
94 | #define U8500_UART2_BASE (U8500_PER3_BASE + 0x7000) | ||
95 | #define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000) | ||
96 | #define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000) | ||
97 | |||
98 | /* per2 base addressess */ | ||
99 | #define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000) | ||
100 | #define U8500_SPI2_BASE (U8500_PER2_BASE + 0x1000) | ||
101 | #define U8500_SPI1_BASE (U8500_PER2_BASE + 0x2000) | ||
102 | #define U8500_PWL_BASE (U8500_PER2_BASE + 0x3000) | ||
103 | #define U8500_SDI4_BASE (U8500_PER2_BASE + 0x4000) | ||
104 | #define U8500_MSP2_BASE (U8500_PER2_BASE + 0x7000) | ||
105 | #define U8500_SDI1_BASE (U8500_PER2_BASE + 0x8000) | ||
106 | #define U8500_SDI3_BASE (U8500_PER2_BASE + 0x9000) | ||
107 | #define U8500_SPI0_BASE (U8500_PER2_BASE + 0xa000) | ||
108 | #define U8500_HSIR_BASE (U8500_PER2_BASE + 0xb000) | ||
109 | #define U8500_HSIT_BASE (U8500_PER2_BASE + 0xc000) | ||
110 | #define U8500_CLKRST2_BASE (U8500_PER2_BASE + 0xf000) | ||
111 | |||
112 | /* per1 base addresses */ | ||
113 | #define U8500_I2C1_BASE (U8500_PER1_BASE + 0x2000) | ||
114 | #define U8500_MSP0_BASE (U8500_PER1_BASE + 0x3000) | ||
115 | #define U8500_MSP1_BASE (U8500_PER1_BASE + 0x4000) | ||
116 | #define U8500_SDI0_BASE (U8500_PER1_BASE + 0x6000) | ||
117 | #define U8500_I2C2_BASE (U8500_PER1_BASE + 0x8000) | ||
118 | #define U8500_SPI3_BASE (U8500_PER1_BASE + 0x9000) | ||
119 | #define U8500_I2C4_BASE (U8500_PER1_BASE + 0xa000) | ||
120 | #define U8500_SLIM0_BASE (U8500_PER1_BASE + 0xb000) | ||
121 | #define U8500_CLKRST1_BASE (U8500_PER1_BASE + 0xf000) | ||
122 | |||
123 | #define U8500_SHRM_GOP_INTERRUPT_BASE 0xB7C00040 | ||
124 | |||
125 | #define U8500_GPIOBANK0_BASE U8500_GPIO0_BASE | ||
126 | #define U8500_GPIOBANK1_BASE (U8500_GPIO0_BASE + 0x80) | ||
127 | #define U8500_GPIOBANK2_BASE U8500_GPIO1_BASE | ||
128 | #define U8500_GPIOBANK3_BASE (U8500_GPIO1_BASE + 0x80) | ||
129 | #define U8500_GPIOBANK4_BASE (U8500_GPIO1_BASE + 0x100) | ||
130 | #define U8500_GPIOBANK5_BASE (U8500_GPIO1_BASE + 0x180) | ||
131 | #define U8500_GPIOBANK6_BASE U8500_GPIO2_BASE | ||
132 | #define U8500_GPIOBANK7_BASE (U8500_GPIO2_BASE + 0x80) | ||
133 | #define U8500_GPIOBANK8_BASE U8500_GPIO3_BASE | ||
134 | |||
135 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S index 09cbfda8aee5..c5203b7ea552 100644 --- a/arch/arm/mach-ux500/include/mach/debug-macro.S +++ b/arch/arm/mach-ux500/include/mach/debug-macro.S | |||
@@ -10,11 +10,19 @@ | |||
10 | */ | 10 | */ |
11 | #include <mach/hardware.h> | 11 | #include <mach/hardware.h> |
12 | 12 | ||
13 | #if CONFIG_UX500_DEBUG_UART > 2 | ||
14 | #error Invalid Ux500 debug UART | ||
15 | #endif | ||
16 | |||
17 | #define __UX500_UART(n) UX500_UART##n##_BASE | ||
18 | #define UX500_UART(n) __UX500_UART(n) | ||
19 | #define UART_BASE UX500_UART(CONFIG_UX500_DEBUG_UART) | ||
20 | |||
13 | .macro addruart, rx, tmp | 21 | .macro addruart, rx, tmp |
14 | mrc p15, 0, \rx, c1, c0 | 22 | mrc p15, 0, \rx, c1, c0 |
15 | tst \rx, #1 @ MMU enabled? | 23 | tst \rx, #1 @ MMU enabled? |
16 | ldreq \rx, =U8500_UART2_BASE @ no, physical address | 24 | ldreq \rx, =UART_BASE @ no, physical address |
17 | ldrne \rx, =IO_ADDRESS(U8500_UART2_BASE) @ yes, virtual address | 25 | ldrne \rx, =IO_ADDRESS(UART_BASE) @ yes, virtual address |
18 | .endm | 26 | .endm |
19 | 27 | ||
20 | #include <asm/hardware/debug-pl01x.S> | 28 | #include <asm/hardware/debug-pl01x.S> |
diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/include/mach/devices.h new file mode 100644 index 000000000000..0422af00a56e --- /dev/null +++ b/arch/arm/mach-ux500/include/mach/devices.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * | ||
4 | * License terms: GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef __ASM_ARCH_DEVICES_H__ | ||
8 | #define __ASM_ARCH_DEVICES_H__ | ||
9 | |||
10 | struct platform_device; | ||
11 | struct amba_device; | ||
12 | |||
13 | extern struct platform_device u5500_gpio_devs[]; | ||
14 | extern struct platform_device u8500_gpio_devs[]; | ||
15 | |||
16 | extern struct amba_device ux500_pl031_device; | ||
17 | extern struct amba_device u8500_ssp0_device; | ||
18 | extern struct amba_device ux500_uart0_device; | ||
19 | extern struct amba_device ux500_uart1_device; | ||
20 | extern struct amba_device ux500_uart2_device; | ||
21 | |||
22 | extern struct platform_device ux500_i2c1_device; | ||
23 | extern struct platform_device ux500_i2c2_device; | ||
24 | extern struct platform_device ux500_i2c3_device; | ||
25 | |||
26 | extern struct platform_device u8500_i2c0_device; | ||
27 | extern struct platform_device u8500_i2c4_device; | ||
28 | |||
29 | #endif | ||
diff --git a/arch/arm/mach-ux500/include/mach/entry-macro.S b/arch/arm/mach-ux500/include/mach/entry-macro.S index eece3301fef7..60ea88db8283 100644 --- a/arch/arm/mach-ux500/include/mach/entry-macro.S +++ b/arch/arm/mach-ux500/include/mach/entry-macro.S | |||
@@ -17,7 +17,7 @@ | |||
17 | .endm | 17 | .endm |
18 | 18 | ||
19 | .macro get_irqnr_preamble, base, tmp | 19 | .macro get_irqnr_preamble, base, tmp |
20 | ldr \base, =IO_ADDRESS(U8500_GIC_CPU_BASE) | 20 | ldr \base, =IO_ADDRESS(UX500_GIC_CPU_BASE) |
21 | .endm | 21 | .endm |
22 | 22 | ||
23 | .macro arch_ret_to_user, tmp1, tmp2 | 23 | .macro arch_ret_to_user, tmp1, tmp2 |
diff --git a/arch/arm/mach-ux500/include/mach/gpio.h b/arch/arm/mach-ux500/include/mach/gpio.h new file mode 100644 index 000000000000..d548a622e7d2 --- /dev/null +++ b/arch/arm/mach-ux500/include/mach/gpio.h | |||
@@ -0,0 +1,50 @@ | |||
1 | #ifndef __ASM_ARCH_GPIO_H | ||
2 | #define __ASM_ARCH_GPIO_H | ||
3 | |||
4 | /* | ||
5 | * 288 (#267 is the highest one actually hooked up) onchip GPIOs, plus enough | ||
6 | * room for a couple of GPIO expanders. | ||
7 | */ | ||
8 | #define ARCH_NR_GPIOS 350 | ||
9 | |||
10 | #include <plat/gpio.h> | ||
11 | |||
12 | #define __GPIO_RESOURCE(soc, block) \ | ||
13 | { \ | ||
14 | .start = soc##_GPIOBANK##block##_BASE, \ | ||
15 | .end = soc##_GPIOBANK##block##_BASE + 127, \ | ||
16 | .flags = IORESOURCE_MEM, \ | ||
17 | }, \ | ||
18 | { \ | ||
19 | .start = IRQ_GPIO##block, \ | ||
20 | .end = IRQ_GPIO##block, \ | ||
21 | .flags = IORESOURCE_IRQ, \ | ||
22 | } | ||
23 | |||
24 | #define __GPIO_DEVICE(soc, block) \ | ||
25 | { \ | ||
26 | .name = "gpio", \ | ||
27 | .id = block, \ | ||
28 | .num_resources = 2, \ | ||
29 | .resource = &soc##_gpio_resources[block * 2], \ | ||
30 | .dev = { \ | ||
31 | .platform_data = &soc##_gpio_data[block], \ | ||
32 | }, \ | ||
33 | } | ||
34 | |||
35 | #define GPIO_DATA(_name, first) \ | ||
36 | { \ | ||
37 | .name = _name, \ | ||
38 | .first_gpio = first, \ | ||
39 | .first_irq = NOMADIK_GPIO_TO_IRQ(first), \ | ||
40 | } | ||
41 | |||
42 | #ifdef CONFIG_UX500_SOC_DB8500 | ||
43 | #define GPIO_RESOURCE(block) __GPIO_RESOURCE(U8500, block) | ||
44 | #define GPIO_DEVICE(block) __GPIO_DEVICE(u8500, block) | ||
45 | #elif defined(CONFIG_UX500_SOC_DB5500) | ||
46 | #define GPIO_RESOURCE(block) __GPIO_RESOURCE(U5500, block) | ||
47 | #define GPIO_DEVICE(block) __GPIO_DEVICE(u5500, block) | ||
48 | #endif | ||
49 | |||
50 | #endif /* __ASM_ARCH_GPIO_H */ | ||
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h index 04ea836969b3..8656379a8309 100644 --- a/arch/arm/mach-ux500/include/mach/hardware.h +++ b/arch/arm/mach-ux500/include/mach/hardware.h | |||
@@ -23,109 +23,106 @@ | |||
23 | 23 | ||
24 | /* typesafe io address */ | 24 | /* typesafe io address */ |
25 | #define __io_address(n) __io(IO_ADDRESS(n)) | 25 | #define __io_address(n) __io(IO_ADDRESS(n)) |
26 | /* used by some plat-nomadik code */ | ||
27 | #define io_p2v(n) __io_address(n) | ||
26 | 28 | ||
27 | /* | 29 | #include <mach/db8500-regs.h> |
28 | * Base address definitions for U8500 Onchip IPs. All the | 30 | #include <mach/db5500-regs.h> |
29 | * peripherals are contained in a single 1 Mbyte region, with | 31 | |
30 | * AHB peripherals at the bottom and APB peripherals at the | 32 | #ifdef CONFIG_UX500_SOC_DB8500 |
31 | * top of the region. PER stands for PERIPHERAL region which | 33 | #define UX500(periph) U8500_##periph##_BASE |
32 | * itself divided into sub regions. | 34 | #elif defined(CONFIG_UX500_SOC_DB5500) |
33 | */ | 35 | #define UX500(periph) U5500_##periph##_BASE |
34 | #define U8500_PER3_BASE 0x80000000 | 36 | #endif |
35 | #define U8500_PER2_BASE 0x80110000 | 37 | |
36 | #define U8500_PER1_BASE 0x80120000 | 38 | #define UX500_BACKUPRAM0_BASE UX500(BACKUPRAM0) |
37 | #define U8500_PER4_BASE 0x80150000 | 39 | #define UX500_BACKUPRAM1_BASE UX500(BACKUPRAM1) |
38 | 40 | #define UX500_B2R2_BASE UX500(B2R2) | |
39 | #define U8500_PER6_BASE 0xa03c0000 | 41 | |
40 | #define U8500_PER5_BASE 0xa03e0000 | 42 | #define UX500_CLKRST1_BASE UX500(CLKRST1) |
41 | #define U8500_PER7_BASE 0xa03d0000 | 43 | #define UX500_CLKRST2_BASE UX500(CLKRST2) |
42 | 44 | #define UX500_CLKRST3_BASE UX500(CLKRST3) | |
43 | #define U8500_SVA_BASE 0xa0100000 | 45 | #define UX500_CLKRST5_BASE UX500(CLKRST5) |
44 | #define U8500_SIA_BASE 0xa0200000 | 46 | #define UX500_CLKRST6_BASE UX500(CLKRST6) |
45 | 47 | ||
46 | #define U8500_SGA_BASE 0xa0300000 | 48 | #define UX500_DMA_BASE UX500(DMA) |
47 | #define U8500_MCDE_BASE 0xa0350000 | 49 | #define UX500_FSMC_BASE UX500(FSMC) |
48 | #define U8500_DMA_BASE 0xa0362000 | 50 | |
49 | 51 | #define UX500_GIC_CPU_BASE UX500(GIC_CPU) | |
50 | #define U8500_SCU_BASE 0xa0410000 | 52 | #define UX500_GIC_DIST_BASE UX500(GIC_DIST) |
51 | #define U8500_GIC_CPU_BASE 0xa0410100 | 53 | |
52 | #define U8500_TWD_BASE 0xa0410600 | 54 | #define UX500_I2C1_BASE UX500(I2C1) |
53 | #define U8500_GIC_DIST_BASE 0xa0411000 | 55 | #define UX500_I2C2_BASE UX500(I2C2) |
54 | #define U8500_L2CC_BASE 0xa0412000 | 56 | #define UX500_I2C3_BASE UX500(I2C3) |
55 | 57 | ||
56 | #define U8500_TWD_SIZE 0x100 | 58 | #define UX500_L2CC_BASE UX500(L2CC) |
57 | 59 | #define UX500_MCDE_BASE UX500(MCDE) | |
58 | /* per7 base addressess */ | 60 | #define UX500_MTU0_BASE UX500(MTU0) |
59 | #define U8500_CR_BASE (U8500_PER7_BASE + 0x8000) | 61 | #define UX500_MTU1_BASE UX500(MTU1) |
60 | #define U8500_MTU0_BASE (U8500_PER7_BASE + 0xa000) | 62 | #define UX500_PRCMU_BASE UX500(PRCMU) |
61 | #define U8500_MTU1_BASE (U8500_PER7_BASE + 0xb000) | 63 | |
62 | #define U8500_TZPC0_BASE (U8500_PER7_BASE + 0xc000) | 64 | #define UX500_RNG_BASE UX500(RNG) |
63 | #define U8500_CLKRST7_BASE (U8500_PER7_BASE + 0xf000) | 65 | #define UX500_RTC_BASE UX500(RTC) |
64 | 66 | ||
65 | /* per6 base addressess */ | 67 | #define UX500_SCU_BASE UX500(SCU) |
66 | #define U8500_RNG_BASE (U8500_PER6_BASE + 0x0000) | 68 | |
67 | #define U8500_PKA_BASE (U8500_PER6_BASE + 0x1000) | 69 | #define UX500_SDI0_BASE UX500(SDI0) |
68 | #define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000) | 70 | #define UX500_SDI1_BASE UX500(SDI1) |
69 | #define U8500_CRYPTO0_BASE (U8500_PER6_BASE + 0xa000) | 71 | #define UX500_SDI2_BASE UX500(SDI2) |
70 | #define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000) | 72 | #define UX500_SDI3_BASE UX500(SDI3) |
71 | #define U8500_CLKRST6_BASE (U8500_PER6_BASE + 0xf000) | 73 | #define UX500_SDI4_BASE UX500(SDI4) |
72 | 74 | ||
73 | /* per5 base addressess */ | 75 | #define UX500_SPI0_BASE UX500(SPI0) |
74 | #define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000) | 76 | #define UX500_SPI1_BASE UX500(SPI1) |
75 | #define U8500_GPIO5_BASE (U8500_PER5_BASE + 0x1e000) | 77 | #define UX500_SPI2_BASE UX500(SPI2) |
76 | #define U8500_CLKRST5_BASE (U8500_PER5_BASE + 0x1f000) | 78 | #define UX500_SPI3_BASE UX500(SPI3) |
77 | 79 | ||
78 | /* per4 base addressess */ | 80 | #define UX500_SIA_BASE UX500(SIA) |
79 | #define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x0000) | 81 | #define UX500_SVA_BASE UX500(SVA) |
80 | #define U8500_BACKUPRAM1_BASE (U8500_PER4_BASE + 0x1000) | 82 | |
81 | #define U8500_RTT0_BASE (U8500_PER4_BASE + 0x2000) | 83 | #define UX500_TWD_BASE UX500(TWD) |
82 | #define U8500_RTT1_BASE (U8500_PER4_BASE + 0x3000) | 84 | |
83 | #define U8500_RTC_BASE (U8500_PER4_BASE + 0x4000) | 85 | #define UX500_UART0_BASE UX500(UART0) |
84 | #define U8500_SCR_BASE (U8500_PER4_BASE + 0x5000) | 86 | #define UX500_UART1_BASE UX500(UART1) |
85 | #define U8500_DMC_BASE (U8500_PER4_BASE + 0x6000) | 87 | #define UX500_UART2_BASE UX500(UART2) |
86 | #define U8500_PRCMU_BASE (U8500_PER4_BASE + 0x7000) | 88 | |
87 | 89 | #define UX500_USBOTG_BASE UX500(USBOTG) | |
88 | /* per3 base addressess */ | ||
89 | #define U8500_FSMC_BASE (U8500_PER3_BASE + 0x0000) | ||
90 | #define U8500_SSP0_BASE (U8500_PER3_BASE + 0x2000) | ||
91 | #define U8500_SSP1_BASE (U8500_PER3_BASE + 0x3000) | ||
92 | #define U8500_I2C0_BASE (U8500_PER3_BASE + 0x4000) | ||
93 | #define U8500_SDI2_BASE (U8500_PER3_BASE + 0x5000) | ||
94 | #define U8500_SKE_BASE (U8500_PER3_BASE + 0x6000) | ||
95 | #define U8500_UART2_BASE (U8500_PER3_BASE + 0x7000) | ||
96 | #define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000) | ||
97 | #define U8500_GPIO3_BASE (U8500_PER3_BASE + 0xe000) | ||
98 | #define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000) | ||
99 | |||
100 | /* per2 base addressess */ | ||
101 | #define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000) | ||
102 | #define U8500_SPI2_BASE (U8500_PER2_BASE + 0x1000) | ||
103 | #define U8500_SPI1_BASE (U8500_PER2_BASE + 0x2000) | ||
104 | #define U8500_PWL_BASE (U8500_PER2_BASE + 0x3000) | ||
105 | #define U8500_SDI4_BASE (U8500_PER2_BASE + 0x4000) | ||
106 | #define U8500_MSP2_BASE (U8500_PER2_BASE + 0x7000) | ||
107 | #define U8500_SDI1_BASE (U8500_PER2_BASE + 0x8000) | ||
108 | #define U8500_SDI3_BASE (U8500_PER2_BASE + 0x9000) | ||
109 | #define U8500_SPI0_BASE (U8500_PER2_BASE + 0xa000) | ||
110 | #define U8500_HSIR_BASE (U8500_PER2_BASE + 0xb000) | ||
111 | #define U8500_HSIT_BASE (U8500_PER2_BASE + 0xc000) | ||
112 | #define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xe000) | ||
113 | #define U8500_CLKRST2_BASE (U8500_PER2_BASE + 0xf000) | ||
114 | |||
115 | /* per1 base addresses */ | ||
116 | #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) | ||
117 | #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) | ||
118 | #define U8500_I2C1_BASE (U8500_PER1_BASE + 0x2000) | ||
119 | #define U8500_MSP0_BASE (U8500_PER1_BASE + 0x3000) | ||
120 | #define U8500_MSP1_BASE (U8500_PER1_BASE + 0x4000) | ||
121 | #define U8500_SDI0_BASE (U8500_PER1_BASE + 0x6000) | ||
122 | #define U8500_I2C2_BASE (U8500_PER1_BASE + 0x8000) | ||
123 | #define U8500_SPI3_BASE (U8500_PER1_BASE + 0x9000) | ||
124 | #define U8500_SLIM0_BASE (U8500_PER1_BASE + 0xa000) | ||
125 | #define U8500_GPIO1_BASE (U8500_PER1_BASE + 0xe000) | ||
126 | #define U8500_CLKRST1_BASE (U8500_PER1_BASE + 0xf000) | ||
127 | 90 | ||
128 | /* ST-Ericsson modified pl022 id */ | 91 | /* ST-Ericsson modified pl022 id */ |
129 | #define SSP_PER_ID 0x01080022 | 92 | #define SSP_PER_ID 0x01080022 |
130 | 93 | ||
94 | #ifndef __ASSEMBLY__ | ||
95 | |||
96 | #include <asm/cputype.h> | ||
97 | |||
98 | static inline bool cpu_is_u8500(void) | ||
99 | { | ||
100 | #ifdef CONFIG_UX500_SOC_DB8500 | ||
101 | return 1; | ||
102 | #else | ||
103 | return 0; | ||
104 | #endif | ||
105 | } | ||
106 | |||
107 | static inline bool cpu_is_u8500ed(void) | ||
108 | { | ||
109 | return cpu_is_u8500() && (read_cpuid_id() & 15) == 0; | ||
110 | } | ||
111 | |||
112 | static inline bool cpu_is_u8500v1(void) | ||
113 | { | ||
114 | return cpu_is_u8500() && (read_cpuid_id() & 15) == 1; | ||
115 | } | ||
116 | |||
117 | static inline bool cpu_is_u5500(void) | ||
118 | { | ||
119 | #ifdef CONFIG_UX500_SOC_DB5500 | ||
120 | return 1; | ||
121 | #else | ||
122 | return 0; | ||
123 | #endif | ||
124 | } | ||
125 | |||
126 | #endif | ||
127 | |||
131 | #endif /* __MACH_HARDWARE_H */ | 128 | #endif /* __MACH_HARDWARE_H */ |
diff --git a/arch/arm/mach-ux500/include/mach/irqs.h b/arch/arm/mach-ux500/include/mach/irqs.h index 394b5dd2200f..7970684b1d09 100644 --- a/arch/arm/mach-ux500/include/mach/irqs.h +++ b/arch/arm/mach-ux500/include/mach/irqs.h | |||
@@ -42,6 +42,7 @@ | |||
42 | #define IRQ_AB4500 (IRQ_SHPI_START + 40) | 42 | #define IRQ_AB4500 (IRQ_SHPI_START + 40) |
43 | #define IRQ_DISP (IRQ_SHPI_START + 48) | 43 | #define IRQ_DISP (IRQ_SHPI_START + 48) |
44 | #define IRQ_SiPI3 (IRQ_SHPI_START + 49) | 44 | #define IRQ_SiPI3 (IRQ_SHPI_START + 49) |
45 | #define IRQ_I2C4 (IRQ_SHPI_START + 51) | ||
45 | #define IRQ_SSP1 (IRQ_SHPI_START + 52) | 46 | #define IRQ_SSP1 (IRQ_SHPI_START + 52) |
46 | #define IRQ_I2C2 (IRQ_SHPI_START + 55) | 47 | #define IRQ_I2C2 (IRQ_SHPI_START + 55) |
47 | #define IRQ_SDMMC0 (IRQ_SHPI_START + 60) | 48 | #define IRQ_SDMMC0 (IRQ_SHPI_START + 60) |
@@ -66,6 +67,12 @@ | |||
66 | /* There are 128 shared peripheral interrupts assigned to | 67 | /* There are 128 shared peripheral interrupts assigned to |
67 | * INTID[160:32]. The first 32 interrupts are reserved. | 68 | * INTID[160:32]. The first 32 interrupts are reserved. |
68 | */ | 69 | */ |
69 | #define NR_IRQS 161 | 70 | #define U8500_SOC_NR_IRQS 161 |
71 | |||
72 | /* After chip-specific IRQ numbers we have the GPIO ones */ | ||
73 | #define NOMADIK_NR_GPIO 288 | ||
74 | #define NOMADIK_GPIO_TO_IRQ(gpio) ((gpio) + U8500_SOC_NR_IRQS) | ||
75 | #define NOMADIK_IRQ_TO_GPIO(irq) ((irq) - U8500_SOC_NR_IRQS) | ||
76 | #define NR_IRQS NOMADIK_GPIO_TO_IRQ(NOMADIK_NR_GPIO) | ||
70 | 77 | ||
71 | #endif /*ASM_ARCH_IRQS_H*/ | 78 | #endif /*ASM_ARCH_IRQS_H*/ |
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h index cf0ce1687f24..e978dbd9e210 100644 --- a/arch/arm/mach-ux500/include/mach/setup.h +++ b/arch/arm/mach-ux500/include/mach/setup.h | |||
@@ -14,10 +14,28 @@ | |||
14 | #include <asm/mach/time.h> | 14 | #include <asm/mach/time.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | 16 | ||
17 | extern void u8500_map_io(void); | 17 | extern void __init ux500_map_io(void); |
18 | extern void u8500_init_devices(void); | 18 | extern void __init u5500_map_io(void); |
19 | extern void u8500_init_irq(void); | 19 | extern void __init u8500_map_io(void); |
20 | |||
21 | extern void __init ux500_init_devices(void); | ||
22 | extern void __init u5500_init_devices(void); | ||
23 | extern void __init u8500_init_devices(void); | ||
24 | |||
25 | extern void __init ux500_init_irq(void); | ||
20 | /* We re-use nomadik_timer for this platform */ | 26 | /* We re-use nomadik_timer for this platform */ |
21 | extern void nmdk_timer_init(void); | 27 | extern void nmdk_timer_init(void); |
22 | 28 | ||
29 | extern void __init amba_add_devices(struct amba_device *devs[], int num); | ||
30 | |||
31 | struct sys_timer; | ||
32 | extern struct sys_timer ux500_timer; | ||
33 | |||
34 | #define __IO_DEV_DESC(x, sz) { \ | ||
35 | .virtual = IO_ADDRESS(x), \ | ||
36 | .pfn = __phys_to_pfn(x), \ | ||
37 | .length = sz, \ | ||
38 | .type = MT_DEVICE, \ | ||
39 | } | ||
40 | |||
23 | #endif /* __ASM_ARCH_SETUP_H */ | 41 | #endif /* __ASM_ARCH_SETUP_H */ |
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c index 8dfe7ca245d8..438ef16aec90 100644 --- a/arch/arm/mach-ux500/platsmp.c +++ b/arch/arm/mach-ux500/platsmp.c | |||
@@ -30,7 +30,7 @@ volatile int __cpuinitdata pen_release = -1; | |||
30 | 30 | ||
31 | static unsigned int __init get_core_count(void) | 31 | static unsigned int __init get_core_count(void) |
32 | { | 32 | { |
33 | return scu_get_core_count(__io_address(U8500_SCU_BASE)); | 33 | return scu_get_core_count(__io_address(UX500_SCU_BASE)); |
34 | } | 34 | } |
35 | 35 | ||
36 | static DEFINE_SPINLOCK(boot_lock); | 36 | static DEFINE_SPINLOCK(boot_lock); |
@@ -44,7 +44,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
44 | * core (e.g. timer irq), then they will not have been enabled | 44 | * core (e.g. timer irq), then they will not have been enabled |
45 | * for us: do so | 45 | * for us: do so |
46 | */ | 46 | */ |
47 | gic_cpu_init(0, __io_address(U8500_GIC_CPU_BASE)); | 47 | gic_cpu_init(0, __io_address(UX500_GIC_CPU_BASE)); |
48 | 48 | ||
49 | /* | 49 | /* |
50 | * let the primary processor know we're out of the | 50 | * let the primary processor know we're out of the |
@@ -75,7 +75,8 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
75 | * that it has been released by resetting pen_release. | 75 | * that it has been released by resetting pen_release. |
76 | */ | 76 | */ |
77 | pen_release = cpu; | 77 | pen_release = cpu; |
78 | flush_cache_all(); | 78 | __cpuc_flush_dcache_area((void *)&pen_release, sizeof(pen_release)); |
79 | outer_clean_range(__pa(&pen_release), __pa(&pen_release) + 1); | ||
79 | 80 | ||
80 | timeout = jiffies + (1 * HZ); | 81 | timeout = jiffies + (1 * HZ); |
81 | while (time_before(jiffies, timeout)) { | 82 | while (time_before(jiffies, timeout)) { |
@@ -105,12 +106,12 @@ static void __init wakeup_secondary(void) | |||
105 | */ | 106 | */ |
106 | #define U8500_CPU1_JUMPADDR_OFFSET 0x1FF4 | 107 | #define U8500_CPU1_JUMPADDR_OFFSET 0x1FF4 |
107 | __raw_writel(virt_to_phys(u8500_secondary_startup), | 108 | __raw_writel(virt_to_phys(u8500_secondary_startup), |
108 | (void __iomem *)IO_ADDRESS(U8500_BACKUPRAM0_BASE) + | 109 | __io_address(UX500_BACKUPRAM0_BASE) + |
109 | U8500_CPU1_JUMPADDR_OFFSET); | 110 | U8500_CPU1_JUMPADDR_OFFSET); |
110 | 111 | ||
111 | #define U8500_CPU1_WAKEMAGIC_OFFSET 0x1FF0 | 112 | #define U8500_CPU1_WAKEMAGIC_OFFSET 0x1FF0 |
112 | __raw_writel(0xA1FEED01, | 113 | __raw_writel(0xA1FEED01, |
113 | (void __iomem *)IO_ADDRESS(U8500_BACKUPRAM0_BASE) + | 114 | __io_address(UX500_BACKUPRAM0_BASE) + |
114 | U8500_CPU1_WAKEMAGIC_OFFSET); | 115 | U8500_CPU1_WAKEMAGIC_OFFSET); |
115 | 116 | ||
116 | /* make sure write buffer is drained */ | 117 | /* make sure write buffer is drained */ |
@@ -171,7 +172,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
171 | * boot CPU, but only if we have more than one CPU. | 172 | * boot CPU, but only if we have more than one CPU. |
172 | */ | 173 | */ |
173 | percpu_timer_setup(); | 174 | percpu_timer_setup(); |
174 | scu_enable(__io_address(U8500_SCU_BASE)); | 175 | scu_enable(__io_address(UX500_SCU_BASE)); |
175 | wakeup_secondary(); | 176 | wakeup_secondary(); |
176 | } | 177 | } |
177 | } | 178 | } |
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 270c8e2a4490..33027301639e 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -755,7 +755,7 @@ config CACHE_L2X0 | |||
755 | bool "Enable the L2x0 outer cache controller" | 755 | bool "Enable the L2x0 outer cache controller" |
756 | depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ | 756 | depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ |
757 | REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || \ | 757 | REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || \ |
758 | ARCH_NOMADIK || ARCH_OMAP4 || ARCH_VEXPRESS_CA9X4 | 758 | ARCH_NOMADIK || ARCH_OMAP4 || ARCH_U8500 || ARCH_VEXPRESS_CA9X4 |
759 | default y | 759 | default y |
760 | select OUTER_CACHE | 760 | select OUTER_CACHE |
761 | help | 761 | help |
@@ -782,3 +782,22 @@ config ARM_L1_CACHE_SHIFT | |||
782 | int | 782 | int |
783 | default 6 if ARM_L1_CACHE_SHIFT_6 | 783 | default 6 if ARM_L1_CACHE_SHIFT_6 |
784 | default 5 | 784 | default 5 |
785 | |||
786 | config ARM_DMA_MEM_BUFFERABLE | ||
787 | bool "Use non-cacheable memory for DMA" if CPU_V6 && !CPU_V7 | ||
788 | default y if CPU_V6 || CPU_V7 | ||
789 | help | ||
790 | Historically, the kernel has used strongly ordered mappings to | ||
791 | provide DMA coherent memory. With the advent of ARMv7, mapping | ||
792 | memory with differing types results in unpredictable behaviour, | ||
793 | so on these CPUs, this option is forced on. | ||
794 | |||
795 | Multiple mappings with differing attributes is also unpredictable | ||
796 | on ARMv6 CPUs, but since they do not have aggressive speculative | ||
797 | prefetch, no harm appears to occur. | ||
798 | |||
799 | However, drivers may be missing the necessary barriers for ARMv6, | ||
800 | and therefore turning this on may result in unpredictable driver | ||
801 | behaviour. Therefore, we offer this as an option. | ||
802 | |||
803 | You are recommended say 'Y' here and debug any affected drivers. | ||
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index edddd66faac6..28b7c2776198 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/proc_fs.h> | 19 | #include <linux/proc_fs.h> |
20 | #include <linux/seq_file.h> | ||
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
22 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
@@ -94,36 +95,29 @@ static const char *usermode_action[] = { | |||
94 | "signal+warn" | 95 | "signal+warn" |
95 | }; | 96 | }; |
96 | 97 | ||
97 | static int | 98 | static int alignment_proc_show(struct seq_file *m, void *v) |
98 | proc_alignment_read(char *page, char **start, off_t off, int count, int *eof, | ||
99 | void *data) | ||
100 | { | 99 | { |
101 | char *p = page; | 100 | seq_printf(m, "User:\t\t%lu\n", ai_user); |
102 | int len; | 101 | seq_printf(m, "System:\t\t%lu\n", ai_sys); |
103 | 102 | seq_printf(m, "Skipped:\t%lu\n", ai_skipped); | |
104 | p += sprintf(p, "User:\t\t%lu\n", ai_user); | 103 | seq_printf(m, "Half:\t\t%lu\n", ai_half); |
105 | p += sprintf(p, "System:\t\t%lu\n", ai_sys); | 104 | seq_printf(m, "Word:\t\t%lu\n", ai_word); |
106 | p += sprintf(p, "Skipped:\t%lu\n", ai_skipped); | ||
107 | p += sprintf(p, "Half:\t\t%lu\n", ai_half); | ||
108 | p += sprintf(p, "Word:\t\t%lu\n", ai_word); | ||
109 | if (cpu_architecture() >= CPU_ARCH_ARMv5TE) | 105 | if (cpu_architecture() >= CPU_ARCH_ARMv5TE) |
110 | p += sprintf(p, "DWord:\t\t%lu\n", ai_dword); | 106 | seq_printf(m, "DWord:\t\t%lu\n", ai_dword); |
111 | p += sprintf(p, "Multi:\t\t%lu\n", ai_multi); | 107 | seq_printf(m, "Multi:\t\t%lu\n", ai_multi); |
112 | p += sprintf(p, "User faults:\t%i (%s)\n", ai_usermode, | 108 | seq_printf(m, "User faults:\t%i (%s)\n", ai_usermode, |
113 | usermode_action[ai_usermode]); | 109 | usermode_action[ai_usermode]); |
114 | 110 | ||
115 | len = (p - page) - off; | 111 | return 0; |
116 | if (len < 0) | 112 | } |
117 | len = 0; | ||
118 | |||
119 | *eof = (len <= count) ? 1 : 0; | ||
120 | *start = page + off; | ||
121 | 113 | ||
122 | return len; | 114 | static int alignment_proc_open(struct inode *inode, struct file *file) |
115 | { | ||
116 | return single_open(file, alignment_proc_show, NULL); | ||
123 | } | 117 | } |
124 | 118 | ||
125 | static int proc_alignment_write(struct file *file, const char __user *buffer, | 119 | static ssize_t alignment_proc_write(struct file *file, const char __user *buffer, |
126 | unsigned long count, void *data) | 120 | size_t count, loff_t *pos) |
127 | { | 121 | { |
128 | char mode; | 122 | char mode; |
129 | 123 | ||
@@ -136,6 +130,13 @@ static int proc_alignment_write(struct file *file, const char __user *buffer, | |||
136 | return count; | 130 | return count; |
137 | } | 131 | } |
138 | 132 | ||
133 | static const struct file_operations alignment_proc_fops = { | ||
134 | .open = alignment_proc_open, | ||
135 | .read = seq_read, | ||
136 | .llseek = seq_lseek, | ||
137 | .release = single_release, | ||
138 | .write = alignment_proc_write, | ||
139 | }; | ||
139 | #endif /* CONFIG_PROC_FS */ | 140 | #endif /* CONFIG_PROC_FS */ |
140 | 141 | ||
141 | union offset_union { | 142 | union offset_union { |
@@ -901,12 +902,10 @@ static int __init alignment_init(void) | |||
901 | #ifdef CONFIG_PROC_FS | 902 | #ifdef CONFIG_PROC_FS |
902 | struct proc_dir_entry *res; | 903 | struct proc_dir_entry *res; |
903 | 904 | ||
904 | res = create_proc_entry("cpu/alignment", S_IWUSR | S_IRUGO, NULL); | 905 | res = proc_create("cpu/alignment", S_IWUSR | S_IRUGO, NULL, |
906 | &alignment_proc_fops); | ||
905 | if (!res) | 907 | if (!res) |
906 | return -ENOMEM; | 908 | return -ENOMEM; |
907 | |||
908 | res->read_proc = proc_alignment_read; | ||
909 | res->write_proc = proc_alignment_write; | ||
910 | #endif | 909 | #endif |
911 | 910 | ||
912 | /* | 911 | /* |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 07334632d3e2..78f0fc8595e2 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | static void __iomem *l2x0_base; | 28 | static void __iomem *l2x0_base; |
29 | static DEFINE_SPINLOCK(l2x0_lock); | 29 | static DEFINE_SPINLOCK(l2x0_lock); |
30 | static uint32_t l2x0_way_mask; /* Bitmask of active ways */ | ||
30 | 31 | ||
31 | static inline void cache_wait(void __iomem *reg, unsigned long mask) | 32 | static inline void cache_wait(void __iomem *reg, unsigned long mask) |
32 | { | 33 | { |
@@ -99,8 +100,8 @@ static inline void l2x0_inv_all(void) | |||
99 | 100 | ||
100 | /* invalidate all ways */ | 101 | /* invalidate all ways */ |
101 | spin_lock_irqsave(&l2x0_lock, flags); | 102 | spin_lock_irqsave(&l2x0_lock, flags); |
102 | writel(0xff, l2x0_base + L2X0_INV_WAY); | 103 | writel(l2x0_way_mask, l2x0_base + L2X0_INV_WAY); |
103 | cache_wait(l2x0_base + L2X0_INV_WAY, 0xff); | 104 | cache_wait(l2x0_base + L2X0_INV_WAY, l2x0_way_mask); |
104 | cache_sync(); | 105 | cache_sync(); |
105 | spin_unlock_irqrestore(&l2x0_lock, flags); | 106 | spin_unlock_irqrestore(&l2x0_lock, flags); |
106 | } | 107 | } |
@@ -199,9 +200,37 @@ static void l2x0_flush_range(unsigned long start, unsigned long end) | |||
199 | void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | 200 | void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) |
200 | { | 201 | { |
201 | __u32 aux; | 202 | __u32 aux; |
203 | __u32 cache_id; | ||
204 | int ways; | ||
205 | const char *type; | ||
202 | 206 | ||
203 | l2x0_base = base; | 207 | l2x0_base = base; |
204 | 208 | ||
209 | cache_id = readl(l2x0_base + L2X0_CACHE_ID); | ||
210 | aux = readl(l2x0_base + L2X0_AUX_CTRL); | ||
211 | |||
212 | /* Determine the number of ways */ | ||
213 | switch (cache_id & L2X0_CACHE_ID_PART_MASK) { | ||
214 | case L2X0_CACHE_ID_PART_L310: | ||
215 | if (aux & (1 << 16)) | ||
216 | ways = 16; | ||
217 | else | ||
218 | ways = 8; | ||
219 | type = "L310"; | ||
220 | break; | ||
221 | case L2X0_CACHE_ID_PART_L210: | ||
222 | ways = (aux >> 13) & 0xf; | ||
223 | type = "L210"; | ||
224 | break; | ||
225 | default: | ||
226 | /* Assume unknown chips have 8 ways */ | ||
227 | ways = 8; | ||
228 | type = "L2x0 series"; | ||
229 | break; | ||
230 | } | ||
231 | |||
232 | l2x0_way_mask = (1 << ways) - 1; | ||
233 | |||
205 | /* | 234 | /* |
206 | * Check if l2x0 controller is already enabled. | 235 | * Check if l2x0 controller is already enabled. |
207 | * If you are booting from non-secure mode | 236 | * If you are booting from non-secure mode |
@@ -210,8 +239,6 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | |||
210 | if (!(readl(l2x0_base + L2X0_CTRL) & 1)) { | 239 | if (!(readl(l2x0_base + L2X0_CTRL) & 1)) { |
211 | 240 | ||
212 | /* l2x0 controller is disabled */ | 241 | /* l2x0 controller is disabled */ |
213 | |||
214 | aux = readl(l2x0_base + L2X0_AUX_CTRL); | ||
215 | aux &= aux_mask; | 242 | aux &= aux_mask; |
216 | aux |= aux_val; | 243 | aux |= aux_val; |
217 | writel(aux, l2x0_base + L2X0_AUX_CTRL); | 244 | writel(aux, l2x0_base + L2X0_AUX_CTRL); |
@@ -226,5 +253,7 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | |||
226 | outer_cache.clean_range = l2x0_clean_range; | 253 | outer_cache.clean_range = l2x0_clean_range; |
227 | outer_cache.flush_range = l2x0_flush_range; | 254 | outer_cache.flush_range = l2x0_flush_range; |
228 | 255 | ||
229 | printk(KERN_INFO "L2X0 cache controller enabled\n"); | 256 | printk(KERN_INFO "%s cache controller enabled\n", type); |
257 | printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x\n", | ||
258 | ways, cache_id, aux); | ||
230 | } | 259 | } |
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index c9b97e9836a2..82df01a72f4a 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c | |||
@@ -133,8 +133,6 @@ make_coherent(struct address_space *mapping, struct vm_area_struct *vma, | |||
133 | flush_dcache_mmap_unlock(mapping); | 133 | flush_dcache_mmap_unlock(mapping); |
134 | if (aliases) | 134 | if (aliases) |
135 | do_adjust_pte(vma, addr, pfn, ptep); | 135 | do_adjust_pte(vma, addr, pfn, ptep); |
136 | else | ||
137 | flush_cache_page(vma, addr, pfn); | ||
138 | } | 136 | } |
139 | 137 | ||
140 | /* | 138 | /* |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 9d40c341e07e..92f5801f99c1 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -463,7 +463,12 @@ static struct fsr_info { | |||
463 | { do_bad, SIGILL, BUS_ADRALN, "alignment exception" }, | 463 | { do_bad, SIGILL, BUS_ADRALN, "alignment exception" }, |
464 | { do_bad, SIGKILL, 0, "terminal exception" }, | 464 | { do_bad, SIGKILL, 0, "terminal exception" }, |
465 | { do_bad, SIGILL, BUS_ADRALN, "alignment exception" }, | 465 | { do_bad, SIGILL, BUS_ADRALN, "alignment exception" }, |
466 | /* Do we need runtime check ? */ | ||
467 | #if __LINUX_ARM_ARCH__ < 6 | ||
466 | { do_bad, SIGBUS, 0, "external abort on linefetch" }, | 468 | { do_bad, SIGBUS, 0, "external abort on linefetch" }, |
469 | #else | ||
470 | { do_translation_fault, SIGSEGV, SEGV_MAPERR, "I-cache maintenance fault" }, | ||
471 | #endif | ||
467 | { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, | 472 | { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" }, |
468 | { do_bad, SIGBUS, 0, "external abort on linefetch" }, | 473 | { do_bad, SIGBUS, 0, "external abort on linefetch" }, |
469 | { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, | 474 | { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" }, |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 7829cb5425f5..105d1d4f420b 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/mman.h> | 15 | #include <linux/mman.h> |
16 | #include <linux/nodemask.h> | 16 | #include <linux/nodemask.h> |
17 | #include <linux/initrd.h> | 17 | #include <linux/initrd.h> |
18 | #include <linux/sort.h> | ||
19 | #include <linux/highmem.h> | 18 | #include <linux/highmem.h> |
20 | 19 | ||
21 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
@@ -226,20 +225,6 @@ static int __init check_initrd(struct meminfo *mi) | |||
226 | return initrd_node; | 225 | return initrd_node; |
227 | } | 226 | } |
228 | 227 | ||
229 | static inline void map_memory_bank(struct membank *bank) | ||
230 | { | ||
231 | #ifdef CONFIG_MMU | ||
232 | struct map_desc map; | ||
233 | |||
234 | map.pfn = bank_pfn_start(bank); | ||
235 | map.virtual = __phys_to_virt(bank_phys_start(bank)); | ||
236 | map.length = bank_phys_size(bank); | ||
237 | map.type = MT_MEMORY; | ||
238 | |||
239 | create_mapping(&map); | ||
240 | #endif | ||
241 | } | ||
242 | |||
243 | static void __init bootmem_init_node(int node, struct meminfo *mi, | 228 | static void __init bootmem_init_node(int node, struct meminfo *mi, |
244 | unsigned long start_pfn, unsigned long end_pfn) | 229 | unsigned long start_pfn, unsigned long end_pfn) |
245 | { | 230 | { |
@@ -249,16 +234,6 @@ static void __init bootmem_init_node(int node, struct meminfo *mi, | |||
249 | int i; | 234 | int i; |
250 | 235 | ||
251 | /* | 236 | /* |
252 | * Map the memory banks for this node. | ||
253 | */ | ||
254 | for_each_nodebank(i, mi, node) { | ||
255 | struct membank *bank = &mi->bank[i]; | ||
256 | |||
257 | if (!bank->highmem) | ||
258 | map_memory_bank(bank); | ||
259 | } | ||
260 | |||
261 | /* | ||
262 | * Allocate the bootmem bitmap page. | 237 | * Allocate the bootmem bitmap page. |
263 | */ | 238 | */ |
264 | boot_pages = bootmem_bootmap_pages(end_pfn - start_pfn); | 239 | boot_pages = bootmem_bootmap_pages(end_pfn - start_pfn); |
@@ -387,21 +362,12 @@ static void arm_memory_present(struct meminfo *mi, int node) | |||
387 | } | 362 | } |
388 | #endif | 363 | #endif |
389 | 364 | ||
390 | static int __init meminfo_cmp(const void *_a, const void *_b) | ||
391 | { | ||
392 | const struct membank *a = _a, *b = _b; | ||
393 | long cmp = bank_pfn_start(a) - bank_pfn_start(b); | ||
394 | return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; | ||
395 | } | ||
396 | |||
397 | void __init bootmem_init(void) | 365 | void __init bootmem_init(void) |
398 | { | 366 | { |
399 | struct meminfo *mi = &meminfo; | 367 | struct meminfo *mi = &meminfo; |
400 | unsigned long min, max_low, max_high; | 368 | unsigned long min, max_low, max_high; |
401 | int node, initrd_node; | 369 | int node, initrd_node; |
402 | 370 | ||
403 | sort(&mi->bank, mi->nr_banks, sizeof(mi->bank[0]), meminfo_cmp, NULL); | ||
404 | |||
405 | /* | 371 | /* |
406 | * Locate which node contains the ramdisk image, if any. | 372 | * Locate which node contains the ramdisk image, if any. |
407 | */ | 373 | */ |
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h index a888363398f8..815d08eecbb0 100644 --- a/arch/arm/mm/mm.h +++ b/arch/arm/mm/mm.h | |||
@@ -28,10 +28,7 @@ extern void __flush_dcache_page(struct address_space *mapping, struct page *page | |||
28 | 28 | ||
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | struct map_desc; | ||
32 | struct meminfo; | ||
33 | struct pglist_data; | 31 | struct pglist_data; |
34 | 32 | ||
35 | void __init create_mapping(struct map_desc *md); | ||
36 | void __init bootmem_init(void); | 33 | void __init bootmem_init(void); |
37 | void reserve_node_zero(struct pglist_data *pgdat); | 34 | void reserve_node_zero(struct pglist_data *pgdat); |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 9d4da6ac28eb..69852003675f 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/bootmem.h> | 14 | #include <linux/bootmem.h> |
15 | #include <linux/mman.h> | 15 | #include <linux/mman.h> |
16 | #include <linux/nodemask.h> | 16 | #include <linux/nodemask.h> |
17 | #include <linux/sort.h> | ||
17 | 18 | ||
18 | #include <asm/cputype.h> | 19 | #include <asm/cputype.h> |
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
@@ -599,7 +600,7 @@ static void __init create_36bit_mapping(struct map_desc *md, | |||
599 | * offsets, and we take full advantage of sections and | 600 | * offsets, and we take full advantage of sections and |
600 | * supersections. | 601 | * supersections. |
601 | */ | 602 | */ |
602 | void __init create_mapping(struct map_desc *md) | 603 | static void __init create_mapping(struct map_desc *md) |
603 | { | 604 | { |
604 | unsigned long phys, addr, length, end; | 605 | unsigned long phys, addr, length, end; |
605 | const struct mem_type *type; | 606 | const struct mem_type *type; |
@@ -1013,6 +1014,39 @@ static void __init kmap_init(void) | |||
1013 | #endif | 1014 | #endif |
1014 | } | 1015 | } |
1015 | 1016 | ||
1017 | static inline void map_memory_bank(struct membank *bank) | ||
1018 | { | ||
1019 | struct map_desc map; | ||
1020 | |||
1021 | map.pfn = bank_pfn_start(bank); | ||
1022 | map.virtual = __phys_to_virt(bank_phys_start(bank)); | ||
1023 | map.length = bank_phys_size(bank); | ||
1024 | map.type = MT_MEMORY; | ||
1025 | |||
1026 | create_mapping(&map); | ||
1027 | } | ||
1028 | |||
1029 | static void __init map_lowmem(void) | ||
1030 | { | ||
1031 | struct meminfo *mi = &meminfo; | ||
1032 | int i; | ||
1033 | |||
1034 | /* Map all the lowmem memory banks. */ | ||
1035 | for (i = 0; i < mi->nr_banks; i++) { | ||
1036 | struct membank *bank = &mi->bank[i]; | ||
1037 | |||
1038 | if (!bank->highmem) | ||
1039 | map_memory_bank(bank); | ||
1040 | } | ||
1041 | } | ||
1042 | |||
1043 | static int __init meminfo_cmp(const void *_a, const void *_b) | ||
1044 | { | ||
1045 | const struct membank *a = _a, *b = _b; | ||
1046 | long cmp = bank_pfn_start(a) - bank_pfn_start(b); | ||
1047 | return cmp < 0 ? -1 : cmp > 0 ? 1 : 0; | ||
1048 | } | ||
1049 | |||
1016 | /* | 1050 | /* |
1017 | * paging_init() sets up the page tables, initialises the zone memory | 1051 | * paging_init() sets up the page tables, initialises the zone memory |
1018 | * maps, and sets up the zero page, bad page and bad page tables. | 1052 | * maps, and sets up the zero page, bad page and bad page tables. |
@@ -1021,9 +1055,12 @@ void __init paging_init(struct machine_desc *mdesc) | |||
1021 | { | 1055 | { |
1022 | void *zero_page; | 1056 | void *zero_page; |
1023 | 1057 | ||
1058 | sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL); | ||
1059 | |||
1024 | build_mem_type_table(); | 1060 | build_mem_type_table(); |
1025 | sanity_check_meminfo(); | 1061 | sanity_check_meminfo(); |
1026 | prepare_page_table(); | 1062 | prepare_page_table(); |
1063 | map_lowmem(); | ||
1027 | bootmem_init(); | 1064 | bootmem_init(); |
1028 | devicemaps_init(mdesc); | 1065 | devicemaps_init(mdesc); |
1029 | kmap_init(); | 1066 | kmap_init(); |
diff --git a/arch/arm/nwfpe/fpmodule.c b/arch/arm/nwfpe/fpmodule.c index 4c0ab50f399a..cb7658e8acc5 100644 --- a/arch/arm/nwfpe/fpmodule.c +++ b/arch/arm/nwfpe/fpmodule.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "fpa11.h" | 24 | #include "fpa11.h" |
25 | 25 | ||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/moduleparam.h> | ||
27 | 28 | ||
28 | /* XXX */ | 29 | /* XXX */ |
29 | #include <linux/errno.h> | 30 | #include <linux/errno.h> |
@@ -134,13 +135,17 @@ a SIGFPE exception if necessary. If not the relevant bits in the | |||
134 | cumulative exceptions flag byte are set and we return. | 135 | cumulative exceptions flag byte are set and we return. |
135 | */ | 136 | */ |
136 | 137 | ||
138 | #ifdef CONFIG_DEBUG_USER | ||
139 | /* By default, ignore inexact errors as there are far too many of them to log */ | ||
140 | static int debug = ~BIT_IXC; | ||
141 | #endif | ||
142 | |||
137 | void float_raise(signed char flags) | 143 | void float_raise(signed char flags) |
138 | { | 144 | { |
139 | register unsigned int fpsr, cumulativeTraps; | 145 | register unsigned int fpsr, cumulativeTraps; |
140 | 146 | ||
141 | #ifdef CONFIG_DEBUG_USER | 147 | #ifdef CONFIG_DEBUG_USER |
142 | /* Ignore inexact errors as there are far too many of them to log */ | 148 | if (flags & debug) |
143 | if (flags & ~BIT_IXC) | ||
144 | printk(KERN_DEBUG | 149 | printk(KERN_DEBUG |
145 | "NWFPE: %s[%d] takes exception %08x at %p from %08lx\n", | 150 | "NWFPE: %s[%d] takes exception %08x at %p from %08lx\n", |
146 | current->comm, current->pid, flags, | 151 | current->comm, current->pid, flags, |
@@ -179,3 +184,7 @@ module_exit(fpe_exit); | |||
179 | MODULE_AUTHOR("Scott Bambrough <scottb@rebel.com>"); | 184 | MODULE_AUTHOR("Scott Bambrough <scottb@rebel.com>"); |
180 | MODULE_DESCRIPTION("NWFPE floating point emulator (" NWFPE_BITS " precision)"); | 185 | MODULE_DESCRIPTION("NWFPE floating point emulator (" NWFPE_BITS " precision)"); |
181 | MODULE_LICENSE("GPL"); | 186 | MODULE_LICENSE("GPL"); |
187 | |||
188 | #ifdef CONFIG_DEBUG_USER | ||
189 | module_param(debug, int, 0644); | ||
190 | #endif | ||
diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile index 36bff0325959..69b09c1cec8b 100644 --- a/arch/arm/plat-iop/Makefile +++ b/arch/arm/plat-iop/Makefile | |||
@@ -13,6 +13,7 @@ obj-$(CONFIG_ARCH_IOP32X) += time.o | |||
13 | obj-$(CONFIG_ARCH_IOP32X) += io.o | 13 | obj-$(CONFIG_ARCH_IOP32X) += io.o |
14 | obj-$(CONFIG_ARCH_IOP32X) += cp6.o | 14 | obj-$(CONFIG_ARCH_IOP32X) += cp6.o |
15 | obj-$(CONFIG_ARCH_IOP32X) += adma.o | 15 | obj-$(CONFIG_ARCH_IOP32X) += adma.o |
16 | obj-$(CONFIG_ARCH_IOP32X) += pmu.o | ||
16 | 17 | ||
17 | # IOP33X | 18 | # IOP33X |
18 | obj-$(CONFIG_ARCH_IOP33X) += gpio.o | 19 | obj-$(CONFIG_ARCH_IOP33X) += gpio.o |
@@ -23,6 +24,7 @@ obj-$(CONFIG_ARCH_IOP33X) += time.o | |||
23 | obj-$(CONFIG_ARCH_IOP33X) += io.o | 24 | obj-$(CONFIG_ARCH_IOP33X) += io.o |
24 | obj-$(CONFIG_ARCH_IOP33X) += cp6.o | 25 | obj-$(CONFIG_ARCH_IOP33X) += cp6.o |
25 | obj-$(CONFIG_ARCH_IOP33X) += adma.o | 26 | obj-$(CONFIG_ARCH_IOP33X) += adma.o |
27 | obj-$(CONFIG_ARCH_IOP33X) += pmu.o | ||
26 | 28 | ||
27 | # IOP13XX | 29 | # IOP13XX |
28 | obj-$(CONFIG_ARCH_IOP13XX) += cp6.o | 30 | obj-$(CONFIG_ARCH_IOP13XX) += cp6.o |
diff --git a/arch/arm/plat-iop/pmu.c b/arch/arm/plat-iop/pmu.c new file mode 100644 index 000000000000..a2024b8685a1 --- /dev/null +++ b/arch/arm/plat-iop/pmu.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * PMU IRQ registration for the iop3xx xscale PMU families. | ||
3 | * Copyright (C) 2010 Will Deacon, ARM Ltd. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/platform_device.h> | ||
12 | #include <asm/pmu.h> | ||
13 | #include <mach/irqs.h> | ||
14 | |||
15 | static struct resource pmu_resource = { | ||
16 | #ifdef CONFIG_ARCH_IOP32X | ||
17 | .start = IRQ_IOP32X_CORE_PMU, | ||
18 | .end = IRQ_IOP32X_CORE_PMU, | ||
19 | #endif | ||
20 | #ifdef CONFIG_ARCH_IOP33X | ||
21 | .start = IRQ_IOP33X_CORE_PMU, | ||
22 | .end = IRQ_IOP33X_CORE_PMU, | ||
23 | #endif | ||
24 | .flags = IORESOURCE_IRQ, | ||
25 | }; | ||
26 | |||
27 | static struct platform_device pmu_device = { | ||
28 | .name = "arm-pmu", | ||
29 | .id = ARM_PMU_DEVICE_CPU, | ||
30 | .resource = &pmu_resource, | ||
31 | .num_resources = 1, | ||
32 | }; | ||
33 | |||
34 | static int __init iop3xx_pmu_init(void) | ||
35 | { | ||
36 | platform_device_register(&pmu_device); | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | arch_initcall(iop3xx_pmu_init); | ||
diff --git a/arch/arm/plat-nomadik/Kconfig b/arch/arm/plat-nomadik/Kconfig index 159daf583f85..5da3f97c537b 100644 --- a/arch/arm/plat-nomadik/Kconfig +++ b/arch/arm/plat-nomadik/Kconfig | |||
@@ -19,4 +19,9 @@ config HAS_MTU | |||
19 | to multiple interrupt generating programmable | 19 | to multiple interrupt generating programmable |
20 | 32-bit free running decrementing counters. | 20 | 32-bit free running decrementing counters. |
21 | 21 | ||
22 | config NOMADIK_GPIO | ||
23 | bool | ||
24 | help | ||
25 | Support for the Nomadik GPIO controller. | ||
26 | |||
22 | endif | 27 | endif |
diff --git a/arch/arm/plat-nomadik/Makefile b/arch/arm/plat-nomadik/Makefile index 37c7cdd0f8f0..c33547361bd7 100644 --- a/arch/arm/plat-nomadik/Makefile +++ b/arch/arm/plat-nomadik/Makefile | |||
@@ -3,3 +3,4 @@ | |||
3 | # Licensed under GPLv2 | 3 | # Licensed under GPLv2 |
4 | 4 | ||
5 | obj-$(CONFIG_HAS_MTU) += timer.o | 5 | obj-$(CONFIG_HAS_MTU) += timer.o |
6 | obj-$(CONFIG_NOMADIK_GPIO) += gpio.o | ||
diff --git a/arch/arm/mach-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c index 9a09b2791e03..d28900cfa541 100644 --- a/arch/arm/mach-nomadik/gpio.c +++ b/arch/arm/plat-nomadik/gpio.c | |||
@@ -13,8 +13,10 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/amba/bus.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <linux/clk.h> | ||
19 | #include <linux/err.h> | ||
18 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
19 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
20 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
@@ -35,8 +37,9 @@ | |||
35 | struct nmk_gpio_chip { | 37 | struct nmk_gpio_chip { |
36 | struct gpio_chip chip; | 38 | struct gpio_chip chip; |
37 | void __iomem *addr; | 39 | void __iomem *addr; |
40 | struct clk *clk; | ||
38 | unsigned int parent_irq; | 41 | unsigned int parent_irq; |
39 | spinlock_t *lock; | 42 | spinlock_t lock; |
40 | /* Keep track of configured edges */ | 43 | /* Keep track of configured edges */ |
41 | u32 edge_rising; | 44 | u32 edge_rising; |
42 | u32 edge_falling; | 45 | u32 edge_falling; |
@@ -107,40 +110,37 @@ static void nmk_gpio_irq_ack(unsigned int irq) | |||
107 | writel(nmk_gpio_get_bitmask(gpio), nmk_chip->addr + NMK_GPIO_IC); | 110 | writel(nmk_gpio_get_bitmask(gpio), nmk_chip->addr + NMK_GPIO_IC); |
108 | } | 111 | } |
109 | 112 | ||
110 | static void nmk_gpio_irq_mask(unsigned int irq) | 113 | static void __nmk_gpio_irq_modify(struct nmk_gpio_chip *nmk_chip, |
114 | int gpio, bool enable) | ||
111 | { | 115 | { |
112 | int gpio; | 116 | u32 bitmask = nmk_gpio_get_bitmask(gpio); |
113 | struct nmk_gpio_chip *nmk_chip; | 117 | u32 reg; |
114 | unsigned long flags; | ||
115 | u32 bitmask, reg; | ||
116 | |||
117 | gpio = NOMADIK_IRQ_TO_GPIO(irq); | ||
118 | nmk_chip = get_irq_chip_data(irq); | ||
119 | bitmask = nmk_gpio_get_bitmask(gpio); | ||
120 | if (!nmk_chip) | ||
121 | return; | ||
122 | 118 | ||
123 | /* we must individually clear the two edges */ | 119 | /* we must individually set/clear the two edges */ |
124 | spin_lock_irqsave(&nmk_chip->lock, flags); | ||
125 | if (nmk_chip->edge_rising & bitmask) { | 120 | if (nmk_chip->edge_rising & bitmask) { |
126 | reg = readl(nmk_chip->addr + NMK_GPIO_RWIMSC); | 121 | reg = readl(nmk_chip->addr + NMK_GPIO_RIMSC); |
127 | reg &= ~bitmask; | 122 | if (enable) |
128 | writel(reg, nmk_chip->addr + NMK_GPIO_RWIMSC); | 123 | reg |= bitmask; |
124 | else | ||
125 | reg &= ~bitmask; | ||
126 | writel(reg, nmk_chip->addr + NMK_GPIO_RIMSC); | ||
129 | } | 127 | } |
130 | if (nmk_chip->edge_falling & bitmask) { | 128 | if (nmk_chip->edge_falling & bitmask) { |
131 | reg = readl(nmk_chip->addr + NMK_GPIO_FWIMSC); | 129 | reg = readl(nmk_chip->addr + NMK_GPIO_FIMSC); |
132 | reg &= ~bitmask; | 130 | if (enable) |
133 | writel(reg, nmk_chip->addr + NMK_GPIO_FWIMSC); | 131 | reg |= bitmask; |
132 | else | ||
133 | reg &= ~bitmask; | ||
134 | writel(reg, nmk_chip->addr + NMK_GPIO_FIMSC); | ||
134 | } | 135 | } |
135 | spin_unlock_irqrestore(&nmk_chip->lock, flags); | 136 | } |
136 | }; | ||
137 | 137 | ||
138 | static void nmk_gpio_irq_unmask(unsigned int irq) | 138 | static void nmk_gpio_irq_modify(unsigned int irq, bool enable) |
139 | { | 139 | { |
140 | int gpio; | 140 | int gpio; |
141 | struct nmk_gpio_chip *nmk_chip; | 141 | struct nmk_gpio_chip *nmk_chip; |
142 | unsigned long flags; | 142 | unsigned long flags; |
143 | u32 bitmask, reg; | 143 | u32 bitmask; |
144 | 144 | ||
145 | gpio = NOMADIK_IRQ_TO_GPIO(irq); | 145 | gpio = NOMADIK_IRQ_TO_GPIO(irq); |
146 | nmk_chip = get_irq_chip_data(irq); | 146 | nmk_chip = get_irq_chip_data(irq); |
@@ -148,23 +148,24 @@ static void nmk_gpio_irq_unmask(unsigned int irq) | |||
148 | if (!nmk_chip) | 148 | if (!nmk_chip) |
149 | return; | 149 | return; |
150 | 150 | ||
151 | /* we must individually set the two edges */ | ||
152 | spin_lock_irqsave(&nmk_chip->lock, flags); | 151 | spin_lock_irqsave(&nmk_chip->lock, flags); |
153 | if (nmk_chip->edge_rising & bitmask) { | 152 | __nmk_gpio_irq_modify(nmk_chip, gpio, enable); |
154 | reg = readl(nmk_chip->addr + NMK_GPIO_RWIMSC); | ||
155 | reg |= bitmask; | ||
156 | writel(reg, nmk_chip->addr + NMK_GPIO_RWIMSC); | ||
157 | } | ||
158 | if (nmk_chip->edge_falling & bitmask) { | ||
159 | reg = readl(nmk_chip->addr + NMK_GPIO_FWIMSC); | ||
160 | reg |= bitmask; | ||
161 | writel(reg, nmk_chip->addr + NMK_GPIO_FWIMSC); | ||
162 | } | ||
163 | spin_unlock_irqrestore(&nmk_chip->lock, flags); | 153 | spin_unlock_irqrestore(&nmk_chip->lock, flags); |
164 | } | 154 | } |
165 | 155 | ||
156 | static void nmk_gpio_irq_mask(unsigned int irq) | ||
157 | { | ||
158 | nmk_gpio_irq_modify(irq, false); | ||
159 | }; | ||
160 | |||
161 | static void nmk_gpio_irq_unmask(unsigned int irq) | ||
162 | { | ||
163 | nmk_gpio_irq_modify(irq, true); | ||
164 | } | ||
165 | |||
166 | static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) | 166 | static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) |
167 | { | 167 | { |
168 | bool enabled = !(irq_to_desc(irq)->status & IRQ_DISABLED); | ||
168 | int gpio; | 169 | int gpio; |
169 | struct nmk_gpio_chip *nmk_chip; | 170 | struct nmk_gpio_chip *nmk_chip; |
170 | unsigned long flags; | 171 | unsigned long flags; |
@@ -183,19 +184,21 @@ static int nmk_gpio_irq_set_type(unsigned int irq, unsigned int type) | |||
183 | 184 | ||
184 | spin_lock_irqsave(&nmk_chip->lock, flags); | 185 | spin_lock_irqsave(&nmk_chip->lock, flags); |
185 | 186 | ||
187 | if (enabled) | ||
188 | __nmk_gpio_irq_modify(nmk_chip, gpio, false); | ||
189 | |||
186 | nmk_chip->edge_rising &= ~bitmask; | 190 | nmk_chip->edge_rising &= ~bitmask; |
187 | if (type & IRQ_TYPE_EDGE_RISING) | 191 | if (type & IRQ_TYPE_EDGE_RISING) |
188 | nmk_chip->edge_rising |= bitmask; | 192 | nmk_chip->edge_rising |= bitmask; |
189 | writel(nmk_chip->edge_rising, nmk_chip->addr + NMK_GPIO_RIMSC); | ||
190 | 193 | ||
191 | nmk_chip->edge_falling &= ~bitmask; | 194 | nmk_chip->edge_falling &= ~bitmask; |
192 | if (type & IRQ_TYPE_EDGE_FALLING) | 195 | if (type & IRQ_TYPE_EDGE_FALLING) |
193 | nmk_chip->edge_falling |= bitmask; | 196 | nmk_chip->edge_falling |= bitmask; |
194 | writel(nmk_chip->edge_falling, nmk_chip->addr + NMK_GPIO_FIMSC); | ||
195 | 197 | ||
196 | spin_unlock_irqrestore(&nmk_chip->lock, flags); | 198 | if (enabled) |
199 | __nmk_gpio_irq_modify(nmk_chip, gpio, true); | ||
197 | 200 | ||
198 | nmk_gpio_irq_unmask(irq); | 201 | spin_unlock_irqrestore(&nmk_chip->lock, flags); |
199 | 202 | ||
200 | return 0; | 203 | return 0; |
201 | } | 204 | } |
@@ -211,21 +214,27 @@ static struct irq_chip nmk_gpio_irq_chip = { | |||
211 | static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | 214 | static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) |
212 | { | 215 | { |
213 | struct nmk_gpio_chip *nmk_chip; | 216 | struct nmk_gpio_chip *nmk_chip; |
214 | struct irq_chip *host_chip; | 217 | struct irq_chip *host_chip = get_irq_chip(irq); |
215 | unsigned int gpio_irq; | 218 | unsigned int gpio_irq; |
216 | u32 pending; | 219 | u32 pending; |
217 | unsigned int first_irq; | 220 | unsigned int first_irq; |
218 | 221 | ||
222 | if (host_chip->mask_ack) | ||
223 | host_chip->mask_ack(irq); | ||
224 | else { | ||
225 | host_chip->mask(irq); | ||
226 | if (host_chip->ack) | ||
227 | host_chip->ack(irq); | ||
228 | } | ||
229 | |||
219 | nmk_chip = get_irq_data(irq); | 230 | nmk_chip = get_irq_data(irq); |
220 | first_irq = NOMADIK_GPIO_TO_IRQ(nmk_chip->chip.base); | 231 | first_irq = NOMADIK_GPIO_TO_IRQ(nmk_chip->chip.base); |
221 | while ( (pending = readl(nmk_chip->addr + NMK_GPIO_IS)) ) { | 232 | while ( (pending = readl(nmk_chip->addr + NMK_GPIO_IS)) ) { |
222 | gpio_irq = first_irq + __ffs(pending); | 233 | gpio_irq = first_irq + __ffs(pending); |
223 | generic_handle_irq(gpio_irq); | 234 | generic_handle_irq(gpio_irq); |
224 | } | 235 | } |
225 | if (0) {/* don't ack parent irq, as ack == disable */ | 236 | |
226 | host_chip = get_irq_chip(irq); | 237 | host_chip->unmask(irq); |
227 | host_chip->ack(irq); | ||
228 | } | ||
229 | } | 238 | } |
230 | 239 | ||
231 | static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip) | 240 | static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip) |
@@ -239,6 +248,7 @@ static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip) | |||
239 | set_irq_handler(i, handle_edge_irq); | 248 | set_irq_handler(i, handle_edge_irq); |
240 | set_irq_flags(i, IRQF_VALID); | 249 | set_irq_flags(i, IRQF_VALID); |
241 | set_irq_chip_data(i, nmk_chip); | 250 | set_irq_chip_data(i, nmk_chip); |
251 | set_irq_type(i, IRQ_TYPE_EDGE_FALLING); | ||
242 | } | 252 | } |
243 | set_irq_chained_handler(nmk_chip->parent_irq, nmk_gpio_irq_handler); | 253 | set_irq_chained_handler(nmk_chip->parent_irq, nmk_gpio_irq_handler); |
244 | set_irq_data(nmk_chip->parent_irq, nmk_chip); | 254 | set_irq_data(nmk_chip->parent_irq, nmk_chip); |
@@ -297,30 +307,59 @@ static struct gpio_chip nmk_gpio_template = { | |||
297 | .can_sleep = 0, | 307 | .can_sleep = 0, |
298 | }; | 308 | }; |
299 | 309 | ||
300 | static int __init nmk_gpio_probe(struct amba_device *dev, struct amba_id *id) | 310 | static int __init nmk_gpio_probe(struct platform_device *dev) |
301 | { | 311 | { |
302 | struct nmk_gpio_platform_data *pdata; | 312 | struct nmk_gpio_platform_data *pdata = dev->dev.platform_data; |
303 | struct nmk_gpio_chip *nmk_chip; | 313 | struct nmk_gpio_chip *nmk_chip; |
304 | struct gpio_chip *chip; | 314 | struct gpio_chip *chip; |
315 | struct resource *res; | ||
316 | struct clk *clk; | ||
317 | int irq; | ||
305 | int ret; | 318 | int ret; |
306 | 319 | ||
307 | pdata = dev->dev.platform_data; | 320 | if (!pdata) |
308 | ret = amba_request_regions(dev, pdata->name); | 321 | return -ENODEV; |
309 | if (ret) | 322 | |
310 | return ret; | 323 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); |
324 | if (!res) { | ||
325 | ret = -ENOENT; | ||
326 | goto out; | ||
327 | } | ||
328 | |||
329 | irq = platform_get_irq(dev, 0); | ||
330 | if (irq < 0) { | ||
331 | ret = irq; | ||
332 | goto out; | ||
333 | } | ||
334 | |||
335 | if (request_mem_region(res->start, resource_size(res), | ||
336 | dev_name(&dev->dev)) == NULL) { | ||
337 | ret = -EBUSY; | ||
338 | goto out; | ||
339 | } | ||
340 | |||
341 | clk = clk_get(&dev->dev, NULL); | ||
342 | if (IS_ERR(clk)) { | ||
343 | ret = PTR_ERR(clk); | ||
344 | goto out_release; | ||
345 | } | ||
346 | |||
347 | clk_enable(clk); | ||
311 | 348 | ||
312 | nmk_chip = kzalloc(sizeof(*nmk_chip), GFP_KERNEL); | 349 | nmk_chip = kzalloc(sizeof(*nmk_chip), GFP_KERNEL); |
313 | if (!nmk_chip) { | 350 | if (!nmk_chip) { |
314 | ret = -ENOMEM; | 351 | ret = -ENOMEM; |
315 | goto out_amba; | 352 | goto out_clk; |
316 | } | 353 | } |
317 | /* | 354 | /* |
318 | * The virt address in nmk_chip->addr is in the nomadik register space, | 355 | * The virt address in nmk_chip->addr is in the nomadik register space, |
319 | * so we can simply convert the resource address, without remapping | 356 | * so we can simply convert the resource address, without remapping |
320 | */ | 357 | */ |
321 | nmk_chip->addr = io_p2v(dev->res.start); | 358 | nmk_chip->clk = clk; |
359 | nmk_chip->addr = io_p2v(res->start); | ||
322 | nmk_chip->chip = nmk_gpio_template; | 360 | nmk_chip->chip = nmk_gpio_template; |
323 | nmk_chip->parent_irq = pdata->parent_irq; | 361 | nmk_chip->parent_irq = irq; |
362 | spin_lock_init(&nmk_chip->lock); | ||
324 | 363 | ||
325 | chip = &nmk_chip->chip; | 364 | chip = &nmk_chip->chip; |
326 | chip->base = pdata->first_gpio; | 365 | chip->base = pdata->first_gpio; |
@@ -332,7 +371,7 @@ static int __init nmk_gpio_probe(struct amba_device *dev, struct amba_id *id) | |||
332 | if (ret) | 371 | if (ret) |
333 | goto out_free; | 372 | goto out_free; |
334 | 373 | ||
335 | amba_set_drvdata(dev, nmk_chip); | 374 | platform_set_drvdata(dev, nmk_chip); |
336 | 375 | ||
337 | nmk_gpio_init_irq(nmk_chip); | 376 | nmk_gpio_init_irq(nmk_chip); |
338 | 377 | ||
@@ -340,51 +379,50 @@ static int __init nmk_gpio_probe(struct amba_device *dev, struct amba_id *id) | |||
340 | nmk_chip->chip.base, nmk_chip->chip.base+31, nmk_chip->addr); | 379 | nmk_chip->chip.base, nmk_chip->chip.base+31, nmk_chip->addr); |
341 | return 0; | 380 | return 0; |
342 | 381 | ||
343 | out_free: | 382 | out_free: |
344 | kfree(nmk_chip); | 383 | kfree(nmk_chip); |
345 | out_amba: | 384 | out_clk: |
346 | amba_release_regions(dev); | 385 | clk_disable(clk); |
386 | clk_put(clk); | ||
387 | out_release: | ||
388 | release_mem_region(res->start, resource_size(res)); | ||
389 | out: | ||
347 | dev_err(&dev->dev, "Failure %i for GPIO %i-%i\n", ret, | 390 | dev_err(&dev->dev, "Failure %i for GPIO %i-%i\n", ret, |
348 | pdata->first_gpio, pdata->first_gpio+31); | 391 | pdata->first_gpio, pdata->first_gpio+31); |
349 | return ret; | 392 | return ret; |
350 | } | 393 | } |
351 | 394 | ||
352 | static int nmk_gpio_remove(struct amba_device *dev) | 395 | static int __exit nmk_gpio_remove(struct platform_device *dev) |
353 | { | 396 | { |
354 | struct nmk_gpio_chip *nmk_chip; | 397 | struct nmk_gpio_chip *nmk_chip; |
398 | struct resource *res; | ||
355 | 399 | ||
356 | nmk_chip = amba_get_drvdata(dev); | 400 | res = platform_get_resource(dev, IORESOURCE_MEM, 0); |
401 | |||
402 | nmk_chip = platform_get_drvdata(dev); | ||
357 | gpiochip_remove(&nmk_chip->chip); | 403 | gpiochip_remove(&nmk_chip->chip); |
404 | clk_disable(nmk_chip->clk); | ||
405 | clk_put(nmk_chip->clk); | ||
358 | kfree(nmk_chip); | 406 | kfree(nmk_chip); |
359 | amba_release_regions(dev); | 407 | release_mem_region(res->start, resource_size(res)); |
360 | return 0; | 408 | return 0; |
361 | } | 409 | } |
362 | 410 | ||
363 | 411 | ||
364 | /* We have 0x1f080060 and 0x1f180060, accept both using the mask */ | 412 | static struct platform_driver nmk_gpio_driver = { |
365 | static struct amba_id nmk_gpio_ids[] = { | 413 | .driver = { |
366 | { | ||
367 | .id = 0x1f080060, | ||
368 | .mask = 0xffefffff, | ||
369 | }, | ||
370 | {0, 0}, | ||
371 | }; | ||
372 | |||
373 | static struct amba_driver nmk_gpio_driver = { | ||
374 | .drv = { | ||
375 | .owner = THIS_MODULE, | 414 | .owner = THIS_MODULE, |
376 | .name = "gpio", | 415 | .name = "gpio", |
377 | }, | 416 | }, |
378 | .probe = nmk_gpio_probe, | 417 | .probe = nmk_gpio_probe, |
379 | .remove = nmk_gpio_remove, | 418 | .remove = __exit_p(nmk_gpio_remove), |
380 | .suspend = NULL, /* to be done */ | 419 | .suspend = NULL, /* to be done */ |
381 | .resume = NULL, | 420 | .resume = NULL, |
382 | .id_table = nmk_gpio_ids, | ||
383 | }; | 421 | }; |
384 | 422 | ||
385 | static int __init nmk_gpio_init(void) | 423 | static int __init nmk_gpio_init(void) |
386 | { | 424 | { |
387 | return amba_driver_register(&nmk_gpio_driver); | 425 | return platform_driver_register(&nmk_gpio_driver); |
388 | } | 426 | } |
389 | 427 | ||
390 | arch_initcall(nmk_gpio_init); | 428 | arch_initcall(nmk_gpio_init); |
diff --git a/arch/arm/plat-nomadik/include/plat/gpio.h b/arch/arm/plat-nomadik/include/plat/gpio.h new file mode 100644 index 000000000000..4200811249ca --- /dev/null +++ b/arch/arm/plat-nomadik/include/plat/gpio.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * Structures and registers for GPIO access in the Nomadik SoC | ||
3 | * | ||
4 | * Copyright (C) 2008 STMicroelectronics | ||
5 | * Author: Prafulla WADASKAR <prafulla.wadaskar@st.com> | ||
6 | * Copyright (C) 2009 Alessandro Rubini <rubini@unipv.it> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #ifndef __ASM_PLAT_GPIO_H | ||
13 | #define __ASM_PLAT_GPIO_H | ||
14 | |||
15 | #include <asm-generic/gpio.h> | ||
16 | |||
17 | /* | ||
18 | * These currently cause a function call to happen, they may be optimized | ||
19 | * if needed by adding cpu-specific defines to identify blocks | ||
20 | * (see mach-pxa/include/mach/gpio.h as an example using GPLR etc) | ||
21 | */ | ||
22 | #define gpio_get_value __gpio_get_value | ||
23 | #define gpio_set_value __gpio_set_value | ||
24 | #define gpio_cansleep __gpio_cansleep | ||
25 | #define gpio_to_irq __gpio_to_irq | ||
26 | |||
27 | /* | ||
28 | * "nmk_gpio" and "NMK_GPIO" stand for "Nomadik GPIO", leaving | ||
29 | * the "gpio" namespace for generic and cross-machine functions | ||
30 | */ | ||
31 | |||
32 | /* Register in the logic block */ | ||
33 | #define NMK_GPIO_DAT 0x00 | ||
34 | #define NMK_GPIO_DATS 0x04 | ||
35 | #define NMK_GPIO_DATC 0x08 | ||
36 | #define NMK_GPIO_PDIS 0x0c | ||
37 | #define NMK_GPIO_DIR 0x10 | ||
38 | #define NMK_GPIO_DIRS 0x14 | ||
39 | #define NMK_GPIO_DIRC 0x18 | ||
40 | #define NMK_GPIO_SLPC 0x1c | ||
41 | #define NMK_GPIO_AFSLA 0x20 | ||
42 | #define NMK_GPIO_AFSLB 0x24 | ||
43 | |||
44 | #define NMK_GPIO_RIMSC 0x40 | ||
45 | #define NMK_GPIO_FIMSC 0x44 | ||
46 | #define NMK_GPIO_IS 0x48 | ||
47 | #define NMK_GPIO_IC 0x4c | ||
48 | #define NMK_GPIO_RWIMSC 0x50 | ||
49 | #define NMK_GPIO_FWIMSC 0x54 | ||
50 | #define NMK_GPIO_WKS 0x58 | ||
51 | |||
52 | /* Alternate functions: function C is set in hw by setting both A and B */ | ||
53 | #define NMK_GPIO_ALT_GPIO 0 | ||
54 | #define NMK_GPIO_ALT_A 1 | ||
55 | #define NMK_GPIO_ALT_B 2 | ||
56 | #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B) | ||
57 | |||
58 | extern int nmk_gpio_set_mode(int gpio, int gpio_mode); | ||
59 | extern int nmk_gpio_get_mode(int gpio); | ||
60 | |||
61 | /* | ||
62 | * Platform data to register a block: only the initial gpio/irq number. | ||
63 | */ | ||
64 | struct nmk_gpio_platform_data { | ||
65 | char *name; | ||
66 | int first_gpio; | ||
67 | int first_irq; | ||
68 | }; | ||
69 | |||
70 | #endif /* __ASM_PLAT_GPIO_H */ | ||
diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c index fa7cb3a57cbf..0ff3798769ab 100644 --- a/arch/arm/plat-nomadik/timer.c +++ b/arch/arm/plat-nomadik/timer.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * linux/arch/arm/mach-nomadik/timer.c | 2 | * linux/arch/arm/mach-nomadik/timer.c |
3 | * | 3 | * |
4 | * Copyright (C) 2008 STMicroelectronics | 4 | * Copyright (C) 2008 STMicroelectronics |
5 | * Copyright (C) 2009 Alessandro Rubini, somewhat based on at91sam926x | 5 | * Copyright (C) 2010 Alessandro Rubini |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License version 2, as | 8 | * it under the terms of the GNU General Public License version 2, as |
@@ -18,123 +18,150 @@ | |||
18 | 18 | ||
19 | #include <plat/mtu.h> | 19 | #include <plat/mtu.h> |
20 | 20 | ||
21 | static u32 nmdk_count; /* accumulated count */ | 21 | void __iomem *mtu_base; /* ssigned by machine code */ |
22 | static u32 nmdk_cycle; /* write-once */ | ||
23 | |||
24 | /* setup by the platform code */ | ||
25 | void __iomem *mtu_base; | ||
26 | 22 | ||
27 | /* | 23 | /* |
28 | * clocksource: the MTU device is a decrementing counters, so we negate | 24 | * Kernel assumes that sched_clock can be called early |
29 | * the value being read. | 25 | * but the MTU may not yet be initialized. |
30 | */ | 26 | */ |
31 | static cycle_t nmdk_read_timer(struct clocksource *cs) | 27 | static cycle_t nmdk_read_timer_dummy(struct clocksource *cs) |
32 | { | 28 | { |
33 | u32 count = readl(mtu_base + MTU_VAL(0)); | 29 | return 0; |
34 | return nmdk_count + nmdk_cycle - count; | 30 | } |
35 | 31 | ||
32 | /* clocksource: MTU decrements, so we negate the value being read. */ | ||
33 | static cycle_t nmdk_read_timer(struct clocksource *cs) | ||
34 | { | ||
35 | return -readl(mtu_base + MTU_VAL(0)); | ||
36 | } | 36 | } |
37 | 37 | ||
38 | static struct clocksource nmdk_clksrc = { | 38 | static struct clocksource nmdk_clksrc = { |
39 | .name = "mtu_0", | 39 | .name = "mtu_0", |
40 | .rating = 120, | 40 | .rating = 200, |
41 | .read = nmdk_read_timer, | 41 | .read = nmdk_read_timer_dummy, |
42 | .mask = CLOCKSOURCE_MASK(32), | ||
42 | .shift = 20, | 43 | .shift = 20, |
43 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 44 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
44 | }; | 45 | }; |
45 | 46 | ||
46 | /* | 47 | /* |
47 | * Clockevent device: currently only periodic mode is supported | 48 | * Override the global weak sched_clock symbol with this |
49 | * local implementation which uses the clocksource to get some | ||
50 | * better resolution when scheduling the kernel. We accept that | ||
51 | * this wraps around for now, since it is just a relative time | ||
52 | * stamp. (Inspired by OMAP implementation.) | ||
48 | */ | 53 | */ |
54 | unsigned long long notrace sched_clock(void) | ||
55 | { | ||
56 | return clocksource_cyc2ns(nmdk_clksrc.read( | ||
57 | &nmdk_clksrc), | ||
58 | nmdk_clksrc.mult, | ||
59 | nmdk_clksrc.shift); | ||
60 | } | ||
61 | |||
62 | /* Clockevent device: use one-shot mode */ | ||
49 | static void nmdk_clkevt_mode(enum clock_event_mode mode, | 63 | static void nmdk_clkevt_mode(enum clock_event_mode mode, |
50 | struct clock_event_device *dev) | 64 | struct clock_event_device *dev) |
51 | { | 65 | { |
66 | u32 cr; | ||
67 | |||
52 | switch (mode) { | 68 | switch (mode) { |
53 | case CLOCK_EVT_MODE_PERIODIC: | 69 | case CLOCK_EVT_MODE_PERIODIC: |
54 | /* count current value? */ | 70 | pr_err("%s: periodic mode not supported\n", __func__); |
55 | writel(readl(mtu_base + MTU_IMSC) | 1, mtu_base + MTU_IMSC); | ||
56 | break; | 71 | break; |
57 | case CLOCK_EVT_MODE_ONESHOT: | 72 | case CLOCK_EVT_MODE_ONESHOT: |
58 | BUG(); /* Not supported, yet */ | 73 | /* Load highest value, enable device, enable interrupts */ |
59 | /* FALLTHROUGH */ | 74 | cr = readl(mtu_base + MTU_CR(1)); |
75 | writel(0, mtu_base + MTU_LR(1)); | ||
76 | writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(1)); | ||
77 | writel(0x2, mtu_base + MTU_IMSC); | ||
78 | break; | ||
60 | case CLOCK_EVT_MODE_SHUTDOWN: | 79 | case CLOCK_EVT_MODE_SHUTDOWN: |
61 | case CLOCK_EVT_MODE_UNUSED: | 80 | case CLOCK_EVT_MODE_UNUSED: |
62 | writel(readl(mtu_base + MTU_IMSC) & ~1, mtu_base + MTU_IMSC); | 81 | /* disable irq */ |
82 | writel(0, mtu_base + MTU_IMSC); | ||
63 | break; | 83 | break; |
64 | case CLOCK_EVT_MODE_RESUME: | 84 | case CLOCK_EVT_MODE_RESUME: |
65 | break; | 85 | break; |
66 | } | 86 | } |
67 | } | 87 | } |
68 | 88 | ||
89 | static int nmdk_clkevt_next(unsigned long evt, struct clock_event_device *ev) | ||
90 | { | ||
91 | /* writing the value has immediate effect */ | ||
92 | writel(evt, mtu_base + MTU_LR(1)); | ||
93 | return 0; | ||
94 | } | ||
95 | |||
69 | static struct clock_event_device nmdk_clkevt = { | 96 | static struct clock_event_device nmdk_clkevt = { |
70 | .name = "mtu_0", | 97 | .name = "mtu_1", |
71 | .features = CLOCK_EVT_FEAT_PERIODIC, | 98 | .features = CLOCK_EVT_FEAT_ONESHOT, |
72 | .shift = 32, | 99 | .shift = 32, |
73 | .rating = 100, | 100 | .rating = 200, |
74 | .set_mode = nmdk_clkevt_mode, | 101 | .set_mode = nmdk_clkevt_mode, |
102 | .set_next_event = nmdk_clkevt_next, | ||
75 | }; | 103 | }; |
76 | 104 | ||
77 | /* | 105 | /* |
78 | * IRQ Handler for the timer 0 of the MTU block. The irq is not shared | 106 | * IRQ Handler for timer 1 of the MTU block. |
79 | * as we are the only users of mtu0 by now. | ||
80 | */ | 107 | */ |
81 | static irqreturn_t nmdk_timer_interrupt(int irq, void *dev_id) | 108 | static irqreturn_t nmdk_timer_interrupt(int irq, void *dev_id) |
82 | { | 109 | { |
83 | /* ack: "interrupt clear register" */ | 110 | struct clock_event_device *evdev = dev_id; |
84 | writel(1 << 0, mtu_base + MTU_ICR); | ||
85 | |||
86 | /* we can't count lost ticks, unfortunately */ | ||
87 | nmdk_count += nmdk_cycle; | ||
88 | nmdk_clkevt.event_handler(&nmdk_clkevt); | ||
89 | 111 | ||
112 | writel(1 << 1, mtu_base + MTU_ICR); /* Interrupt clear reg */ | ||
113 | evdev->event_handler(evdev); | ||
90 | return IRQ_HANDLED; | 114 | return IRQ_HANDLED; |
91 | } | 115 | } |
92 | 116 | ||
93 | /* | ||
94 | * Set up timer interrupt, and return the current time in seconds. | ||
95 | */ | ||
96 | static struct irqaction nmdk_timer_irq = { | 117 | static struct irqaction nmdk_timer_irq = { |
97 | .name = "Nomadik Timer Tick", | 118 | .name = "Nomadik Timer Tick", |
98 | .flags = IRQF_DISABLED | IRQF_TIMER, | 119 | .flags = IRQF_DISABLED | IRQF_TIMER, |
99 | .handler = nmdk_timer_interrupt, | 120 | .handler = nmdk_timer_interrupt, |
121 | .dev_id = &nmdk_clkevt, | ||
100 | }; | 122 | }; |
101 | 123 | ||
102 | static void nmdk_timer_reset(void) | ||
103 | { | ||
104 | u32 cr; | ||
105 | |||
106 | writel(0, mtu_base + MTU_CR(0)); /* off */ | ||
107 | |||
108 | /* configure load and background-load, and fire it up */ | ||
109 | writel(nmdk_cycle, mtu_base + MTU_LR(0)); | ||
110 | writel(nmdk_cycle, mtu_base + MTU_BGLR(0)); | ||
111 | cr = MTU_CRn_PERIODIC | MTU_CRn_PRESCALE_1 | MTU_CRn_32BITS; | ||
112 | writel(cr, mtu_base + MTU_CR(0)); | ||
113 | writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(0)); | ||
114 | } | ||
115 | |||
116 | void __init nmdk_timer_init(void) | 124 | void __init nmdk_timer_init(void) |
117 | { | 125 | { |
118 | unsigned long rate; | 126 | unsigned long rate; |
119 | int bits; | 127 | u32 cr = MTU_CRn_32BITS;; |
120 | 128 | ||
121 | rate = CLOCK_TICK_RATE; /* 2.4MHz */ | 129 | /* |
122 | nmdk_cycle = (rate + HZ/2) / HZ; | 130 | * Tick rate is 2.4MHz for Nomadik and 110MHz for ux500: |
131 | * use a divide-by-16 counter if it's more than 16MHz | ||
132 | */ | ||
133 | rate = CLOCK_TICK_RATE; | ||
134 | if (rate > 16 << 20) { | ||
135 | rate /= 16; | ||
136 | cr |= MTU_CRn_PRESCALE_16; | ||
137 | } else { | ||
138 | cr |= MTU_CRn_PRESCALE_1; | ||
139 | } | ||
123 | 140 | ||
124 | /* Init the timer and register clocksource */ | 141 | /* Timer 0 is the free running clocksource */ |
125 | nmdk_timer_reset(); | 142 | writel(cr, mtu_base + MTU_CR(0)); |
143 | writel(0, mtu_base + MTU_LR(0)); | ||
144 | writel(0, mtu_base + MTU_BGLR(0)); | ||
145 | writel(cr | MTU_CRn_ENA, mtu_base + MTU_CR(0)); | ||
126 | 146 | ||
127 | nmdk_clksrc.mult = clocksource_hz2mult(rate, nmdk_clksrc.shift); | 147 | nmdk_clksrc.mult = clocksource_hz2mult(rate, nmdk_clksrc.shift); |
128 | bits = 8*sizeof(nmdk_count); | 148 | /* Now the scheduling clock is ready */ |
129 | nmdk_clksrc.mask = CLOCKSOURCE_MASK(bits); | 149 | nmdk_clksrc.read = nmdk_read_timer; |
130 | 150 | ||
131 | if (clocksource_register(&nmdk_clksrc)) | 151 | if (clocksource_register(&nmdk_clksrc)) |
132 | printk(KERN_ERR "timer: failed to initialize clock " | 152 | pr_err("timer: failed to initialize clock source %s\n", |
133 | "source %s\n", nmdk_clksrc.name); | 153 | nmdk_clksrc.name); |
154 | |||
155 | /* Timer 1 is used for events, fix according to rate */ | ||
156 | writel(cr | MTU_CRn_ONESHOT, mtu_base + MTU_CR(1)); /* off, currently */ | ||
157 | nmdk_clkevt.mult = div_sc(rate, NSEC_PER_SEC, nmdk_clkevt.shift); | ||
158 | nmdk_clkevt.max_delta_ns = | ||
159 | clockevent_delta2ns(0xffffffff, &nmdk_clkevt); | ||
160 | nmdk_clkevt.min_delta_ns = | ||
161 | clockevent_delta2ns(0x00000002, &nmdk_clkevt); | ||
162 | nmdk_clkevt.cpumask = cpumask_of(0); | ||
134 | 163 | ||
135 | /* Register irq and clockevents */ | 164 | /* Register irq and clockevents */ |
136 | setup_irq(IRQ_MTU0, &nmdk_timer_irq); | 165 | setup_irq(IRQ_MTU0, &nmdk_timer_irq); |
137 | nmdk_clkevt.mult = div_sc(rate, NSEC_PER_SEC, nmdk_clkevt.shift); | ||
138 | nmdk_clkevt.cpumask = cpumask_of(0); | ||
139 | clockevents_register_device(&nmdk_clkevt); | 166 | clockevents_register_device(&nmdk_clkevt); |
140 | } | 167 | } |
diff --git a/arch/arm/plat-pxa/Makefile b/arch/arm/plat-pxa/Makefile index 0264bfb0ca4f..f68da35f4fb3 100644 --- a/arch/arm/plat-pxa/Makefile +++ b/arch/arm/plat-pxa/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for code common across different PXA processor families | 2 | # Makefile for code common across different PXA processor families |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := dma.o | 5 | obj-y := dma.o pmu.o |
6 | 6 | ||
7 | obj-$(CONFIG_GENERIC_GPIO) += gpio.o | 7 | obj-$(CONFIG_GENERIC_GPIO) += gpio.o |
8 | obj-$(CONFIG_PXA3xx) += mfp.o | 8 | obj-$(CONFIG_PXA3xx) += mfp.o |
diff --git a/arch/arm/plat-pxa/pmu.c b/arch/arm/plat-pxa/pmu.c new file mode 100644 index 000000000000..267ceb6feb2f --- /dev/null +++ b/arch/arm/plat-pxa/pmu.c | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * PMU IRQ registration for the PXA xscale PMU families. | ||
3 | * Copyright (C) 2010 Will Deacon, ARM Ltd. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/platform_device.h> | ||
12 | #include <asm/pmu.h> | ||
13 | #include <mach/irqs.h> | ||
14 | |||
15 | static struct resource pmu_resource = { | ||
16 | .start = IRQ_PMU, | ||
17 | .end = IRQ_PMU, | ||
18 | .flags = IORESOURCE_IRQ, | ||
19 | }; | ||
20 | |||
21 | static struct platform_device pmu_device = { | ||
22 | .name = "arm-pmu", | ||
23 | .id = ARM_PMU_DEVICE_CPU, | ||
24 | .resource = &pmu_resource, | ||
25 | .num_resources = 1, | ||
26 | }; | ||
27 | |||
28 | static int __init pxa_pmu_init(void) | ||
29 | { | ||
30 | platform_device_register(&pmu_device); | ||
31 | return 0; | ||
32 | } | ||
33 | arch_initcall(pxa_pmu_init); | ||
diff --git a/arch/arm/plat-spear/Kconfig b/arch/arm/plat-spear/Kconfig new file mode 100644 index 000000000000..1bb3dbce8810 --- /dev/null +++ b/arch/arm/plat-spear/Kconfig | |||
@@ -0,0 +1,31 @@ | |||
1 | # | ||
2 | # SPEAr Platform configuration file | ||
3 | # | ||
4 | |||
5 | if PLAT_SPEAR | ||
6 | |||
7 | choice | ||
8 | prompt "ST SPEAr Family" | ||
9 | default ARCH_SPEAR3XX | ||
10 | |||
11 | config ARCH_SPEAR3XX | ||
12 | bool "SPEAr3XX" | ||
13 | select ARM_VIC | ||
14 | select CPU_ARM926T | ||
15 | help | ||
16 | Supports for ARM's SPEAR3XX family | ||
17 | |||
18 | config ARCH_SPEAR6XX | ||
19 | bool "SPEAr6XX" | ||
20 | select ARM_VIC | ||
21 | select CPU_ARM926T | ||
22 | help | ||
23 | Supports for ARM's SPEAR6XX family | ||
24 | |||
25 | endchoice | ||
26 | |||
27 | # Adding SPEAr machine specific configuration files | ||
28 | source "arch/arm/mach-spear3xx/Kconfig" | ||
29 | source "arch/arm/mach-spear6xx/Kconfig" | ||
30 | |||
31 | endif | ||
diff --git a/arch/arm/plat-spear/Makefile b/arch/arm/plat-spear/Makefile new file mode 100644 index 000000000000..eb89540aeda9 --- /dev/null +++ b/arch/arm/plat-spear/Makefile | |||
@@ -0,0 +1,8 @@ | |||
1 | # | ||
2 | # SPEAr Platform specific Makefile | ||
3 | # | ||
4 | |||
5 | # Common support | ||
6 | obj-y := clock.o padmux.o time.o | ||
7 | |||
8 | obj-$(CONFIG_ARCH_SPEAR3XX) += shirq.o | ||
diff --git a/arch/arm/plat-spear/clock.c b/arch/arm/plat-spear/clock.c new file mode 100644 index 000000000000..ee4f90e534d8 --- /dev/null +++ b/arch/arm/plat-spear/clock.c | |||
@@ -0,0 +1,435 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/clock.c | ||
3 | * | ||
4 | * Clock framework for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/bug.h> | ||
15 | #include <linux/err.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/list.h> | ||
18 | #include <linux/module.h> | ||
19 | #include <linux/spinlock.h> | ||
20 | #include <mach/misc_regs.h> | ||
21 | #include <plat/clock.h> | ||
22 | |||
23 | static DEFINE_SPINLOCK(clocks_lock); | ||
24 | static LIST_HEAD(root_clks); | ||
25 | |||
26 | static void propagate_rate(struct list_head *); | ||
27 | |||
28 | static int generic_clk_enable(struct clk *clk) | ||
29 | { | ||
30 | unsigned int val; | ||
31 | |||
32 | if (!clk->en_reg) | ||
33 | return -EFAULT; | ||
34 | |||
35 | val = readl(clk->en_reg); | ||
36 | if (unlikely(clk->flags & RESET_TO_ENABLE)) | ||
37 | val &= ~(1 << clk->en_reg_bit); | ||
38 | else | ||
39 | val |= 1 << clk->en_reg_bit; | ||
40 | |||
41 | writel(val, clk->en_reg); | ||
42 | |||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | static void generic_clk_disable(struct clk *clk) | ||
47 | { | ||
48 | unsigned int val; | ||
49 | |||
50 | if (!clk->en_reg) | ||
51 | return; | ||
52 | |||
53 | val = readl(clk->en_reg); | ||
54 | if (unlikely(clk->flags & RESET_TO_ENABLE)) | ||
55 | val |= 1 << clk->en_reg_bit; | ||
56 | else | ||
57 | val &= ~(1 << clk->en_reg_bit); | ||
58 | |||
59 | writel(val, clk->en_reg); | ||
60 | } | ||
61 | |||
62 | /* generic clk ops */ | ||
63 | static struct clkops generic_clkops = { | ||
64 | .enable = generic_clk_enable, | ||
65 | .disable = generic_clk_disable, | ||
66 | }; | ||
67 | |||
68 | /* | ||
69 | * clk_enable - inform the system when the clock source should be running. | ||
70 | * @clk: clock source | ||
71 | * | ||
72 | * If the clock can not be enabled/disabled, this should return success. | ||
73 | * | ||
74 | * Returns success (0) or negative errno. | ||
75 | */ | ||
76 | int clk_enable(struct clk *clk) | ||
77 | { | ||
78 | unsigned long flags; | ||
79 | int ret = 0; | ||
80 | |||
81 | if (!clk || IS_ERR(clk)) | ||
82 | return -EFAULT; | ||
83 | |||
84 | spin_lock_irqsave(&clocks_lock, flags); | ||
85 | if (clk->usage_count == 0) { | ||
86 | if (clk->ops && clk->ops->enable) | ||
87 | ret = clk->ops->enable(clk); | ||
88 | } | ||
89 | clk->usage_count++; | ||
90 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
91 | |||
92 | return ret; | ||
93 | } | ||
94 | EXPORT_SYMBOL(clk_enable); | ||
95 | |||
96 | /* | ||
97 | * clk_disable - inform the system when the clock source is no longer required. | ||
98 | * @clk: clock source | ||
99 | * | ||
100 | * Inform the system that a clock source is no longer required by | ||
101 | * a driver and may be shut down. | ||
102 | * | ||
103 | * Implementation detail: if the clock source is shared between | ||
104 | * multiple drivers, clk_enable() calls must be balanced by the | ||
105 | * same number of clk_disable() calls for the clock source to be | ||
106 | * disabled. | ||
107 | */ | ||
108 | void clk_disable(struct clk *clk) | ||
109 | { | ||
110 | unsigned long flags; | ||
111 | |||
112 | if (!clk || IS_ERR(clk)) | ||
113 | return; | ||
114 | |||
115 | WARN_ON(clk->usage_count == 0); | ||
116 | |||
117 | spin_lock_irqsave(&clocks_lock, flags); | ||
118 | clk->usage_count--; | ||
119 | if (clk->usage_count == 0) { | ||
120 | if (clk->ops && clk->ops->disable) | ||
121 | clk->ops->disable(clk); | ||
122 | } | ||
123 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
124 | } | ||
125 | EXPORT_SYMBOL(clk_disable); | ||
126 | |||
127 | /** | ||
128 | * clk_get_rate - obtain the current clock rate (in Hz) for a clock source. | ||
129 | * This is only valid once the clock source has been enabled. | ||
130 | * @clk: clock source | ||
131 | */ | ||
132 | unsigned long clk_get_rate(struct clk *clk) | ||
133 | { | ||
134 | unsigned long flags, rate; | ||
135 | |||
136 | spin_lock_irqsave(&clocks_lock, flags); | ||
137 | rate = clk->rate; | ||
138 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
139 | |||
140 | return rate; | ||
141 | } | ||
142 | EXPORT_SYMBOL(clk_get_rate); | ||
143 | |||
144 | /** | ||
145 | * clk_set_parent - set the parent clock source for this clock | ||
146 | * @clk: clock source | ||
147 | * @parent: parent clock source | ||
148 | * | ||
149 | * Returns success (0) or negative errno. | ||
150 | */ | ||
151 | int clk_set_parent(struct clk *clk, struct clk *parent) | ||
152 | { | ||
153 | int i, found = 0, val = 0; | ||
154 | unsigned long flags; | ||
155 | |||
156 | if (!clk || IS_ERR(clk) || !parent || IS_ERR(parent)) | ||
157 | return -EFAULT; | ||
158 | if (clk->usage_count) | ||
159 | return -EBUSY; | ||
160 | if (!clk->pclk_sel) | ||
161 | return -EPERM; | ||
162 | if (clk->pclk == parent) | ||
163 | return 0; | ||
164 | |||
165 | for (i = 0; i < clk->pclk_sel->pclk_count; i++) { | ||
166 | if (clk->pclk_sel->pclk_info[i].pclk == parent) { | ||
167 | found = 1; | ||
168 | break; | ||
169 | } | ||
170 | } | ||
171 | |||
172 | if (!found) | ||
173 | return -EINVAL; | ||
174 | |||
175 | spin_lock_irqsave(&clocks_lock, flags); | ||
176 | /* reflect parent change in hardware */ | ||
177 | val = readl(clk->pclk_sel->pclk_sel_reg); | ||
178 | val &= ~(clk->pclk_sel->pclk_sel_mask << clk->pclk_sel_shift); | ||
179 | val |= clk->pclk_sel->pclk_info[i].pclk_mask << clk->pclk_sel_shift; | ||
180 | writel(val, clk->pclk_sel->pclk_sel_reg); | ||
181 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
182 | |||
183 | /* reflect parent change in software */ | ||
184 | clk->recalc(clk); | ||
185 | propagate_rate(&clk->children); | ||
186 | return 0; | ||
187 | } | ||
188 | EXPORT_SYMBOL(clk_set_parent); | ||
189 | |||
190 | /* registers clock in platform clock framework */ | ||
191 | void clk_register(struct clk_lookup *cl) | ||
192 | { | ||
193 | struct clk *clk = cl->clk; | ||
194 | unsigned long flags; | ||
195 | |||
196 | if (!clk || IS_ERR(clk)) | ||
197 | return; | ||
198 | |||
199 | spin_lock_irqsave(&clocks_lock, flags); | ||
200 | |||
201 | INIT_LIST_HEAD(&clk->children); | ||
202 | if (clk->flags & ALWAYS_ENABLED) | ||
203 | clk->ops = NULL; | ||
204 | else if (!clk->ops) | ||
205 | clk->ops = &generic_clkops; | ||
206 | |||
207 | /* root clock don't have any parents */ | ||
208 | if (!clk->pclk && !clk->pclk_sel) { | ||
209 | list_add(&clk->sibling, &root_clks); | ||
210 | /* add clocks with only one parent to parent's children list */ | ||
211 | } else if (clk->pclk && !clk->pclk_sel) { | ||
212 | list_add(&clk->sibling, &clk->pclk->children); | ||
213 | } else { | ||
214 | /* add clocks with > 1 parent to 1st parent's children list */ | ||
215 | list_add(&clk->sibling, | ||
216 | &clk->pclk_sel->pclk_info[0].pclk->children); | ||
217 | } | ||
218 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
219 | |||
220 | /* add clock to arm clockdev framework */ | ||
221 | clkdev_add(cl); | ||
222 | } | ||
223 | |||
224 | /** | ||
225 | * propagate_rate - recalculate and propagate all clocks in list head | ||
226 | * | ||
227 | * Recalculates all root clocks in list head, which if the clock's .recalc is | ||
228 | * set correctly, should also propagate their rates. | ||
229 | */ | ||
230 | static void propagate_rate(struct list_head *lhead) | ||
231 | { | ||
232 | struct clk *clkp, *_temp; | ||
233 | |||
234 | list_for_each_entry_safe(clkp, _temp, lhead, sibling) { | ||
235 | if (clkp->recalc) | ||
236 | clkp->recalc(clkp); | ||
237 | propagate_rate(&clkp->children); | ||
238 | } | ||
239 | } | ||
240 | |||
241 | /* returns current programmed clocks clock info structure */ | ||
242 | static struct pclk_info *pclk_info_get(struct clk *clk) | ||
243 | { | ||
244 | unsigned int mask, i; | ||
245 | unsigned long flags; | ||
246 | struct pclk_info *info = NULL; | ||
247 | |||
248 | spin_lock_irqsave(&clocks_lock, flags); | ||
249 | mask = (readl(clk->pclk_sel->pclk_sel_reg) >> clk->pclk_sel_shift) | ||
250 | & clk->pclk_sel->pclk_sel_mask; | ||
251 | |||
252 | for (i = 0; i < clk->pclk_sel->pclk_count; i++) { | ||
253 | if (clk->pclk_sel->pclk_info[i].pclk_mask == mask) | ||
254 | info = &clk->pclk_sel->pclk_info[i]; | ||
255 | } | ||
256 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
257 | |||
258 | return info; | ||
259 | } | ||
260 | |||
261 | /* | ||
262 | * Set pclk as cclk's parent and add clock sibling node to current parents | ||
263 | * children list | ||
264 | */ | ||
265 | static void change_parent(struct clk *cclk, struct clk *pclk) | ||
266 | { | ||
267 | unsigned long flags; | ||
268 | |||
269 | spin_lock_irqsave(&clocks_lock, flags); | ||
270 | list_del(&cclk->sibling); | ||
271 | list_add(&cclk->sibling, &pclk->children); | ||
272 | |||
273 | cclk->pclk = pclk; | ||
274 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
275 | } | ||
276 | |||
277 | /* | ||
278 | * calculates current programmed rate of pll1 | ||
279 | * | ||
280 | * In normal mode | ||
281 | * rate = (2 * M[15:8] * Fin)/(N * 2^P) | ||
282 | * | ||
283 | * In Dithered mode | ||
284 | * rate = (2 * M[15:0] * Fin)/(256 * N * 2^P) | ||
285 | */ | ||
286 | void pll1_clk_recalc(struct clk *clk) | ||
287 | { | ||
288 | struct pll_clk_config *config = clk->private_data; | ||
289 | unsigned int num = 2, den = 0, val, mode = 0; | ||
290 | unsigned long flags; | ||
291 | |||
292 | spin_lock_irqsave(&clocks_lock, flags); | ||
293 | mode = (readl(config->mode_reg) >> PLL_MODE_SHIFT) & | ||
294 | PLL_MODE_MASK; | ||
295 | |||
296 | val = readl(config->cfg_reg); | ||
297 | /* calculate denominator */ | ||
298 | den = (val >> PLL_DIV_P_SHIFT) & PLL_DIV_P_MASK; | ||
299 | den = 1 << den; | ||
300 | den *= (val >> PLL_DIV_N_SHIFT) & PLL_DIV_N_MASK; | ||
301 | |||
302 | /* calculate numerator & denominator */ | ||
303 | if (!mode) { | ||
304 | /* Normal mode */ | ||
305 | num *= (val >> PLL_NORM_FDBK_M_SHIFT) & PLL_NORM_FDBK_M_MASK; | ||
306 | } else { | ||
307 | /* Dithered mode */ | ||
308 | num *= (val >> PLL_DITH_FDBK_M_SHIFT) & PLL_DITH_FDBK_M_MASK; | ||
309 | den *= 256; | ||
310 | } | ||
311 | |||
312 | clk->rate = (((clk->pclk->rate/10000) * num) / den) * 10000; | ||
313 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
314 | } | ||
315 | |||
316 | /* calculates current programmed rate of ahb or apb bus */ | ||
317 | void bus_clk_recalc(struct clk *clk) | ||
318 | { | ||
319 | struct bus_clk_config *config = clk->private_data; | ||
320 | unsigned int div; | ||
321 | unsigned long flags; | ||
322 | |||
323 | spin_lock_irqsave(&clocks_lock, flags); | ||
324 | div = ((readl(config->reg) >> config->shift) & config->mask) + 1; | ||
325 | clk->rate = (unsigned long)clk->pclk->rate / div; | ||
326 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
327 | } | ||
328 | |||
329 | /* | ||
330 | * calculates current programmed rate of auxiliary synthesizers | ||
331 | * used by: UART, FIRDA | ||
332 | * | ||
333 | * Fout from synthesizer can be given from two equations: | ||
334 | * Fout1 = (Fin * X/Y)/2 | ||
335 | * Fout2 = Fin * X/Y | ||
336 | * | ||
337 | * Selection of eqn 1 or 2 is programmed in register | ||
338 | */ | ||
339 | void aux_clk_recalc(struct clk *clk) | ||
340 | { | ||
341 | struct aux_clk_config *config = clk->private_data; | ||
342 | struct pclk_info *pclk_info = NULL; | ||
343 | unsigned int num = 1, den = 1, val, eqn; | ||
344 | unsigned long flags; | ||
345 | |||
346 | /* get current programmed parent */ | ||
347 | pclk_info = pclk_info_get(clk); | ||
348 | if (!pclk_info) { | ||
349 | spin_lock_irqsave(&clocks_lock, flags); | ||
350 | clk->pclk = NULL; | ||
351 | clk->rate = 0; | ||
352 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
353 | return; | ||
354 | } | ||
355 | |||
356 | change_parent(clk, pclk_info->pclk); | ||
357 | |||
358 | spin_lock_irqsave(&clocks_lock, flags); | ||
359 | if (pclk_info->scalable) { | ||
360 | val = readl(config->synth_reg); | ||
361 | |||
362 | eqn = (val >> AUX_EQ_SEL_SHIFT) & AUX_EQ_SEL_MASK; | ||
363 | if (eqn == AUX_EQ1_SEL) | ||
364 | den *= 2; | ||
365 | |||
366 | /* calculate numerator */ | ||
367 | num = (val >> AUX_XSCALE_SHIFT) & AUX_XSCALE_MASK; | ||
368 | |||
369 | /* calculate denominator */ | ||
370 | den *= (val >> AUX_YSCALE_SHIFT) & AUX_YSCALE_MASK; | ||
371 | val = (((clk->pclk->rate/10000) * num) / den) * 10000; | ||
372 | } else | ||
373 | val = clk->pclk->rate; | ||
374 | |||
375 | clk->rate = val; | ||
376 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
377 | } | ||
378 | |||
379 | /* | ||
380 | * calculates current programmed rate of gpt synthesizers | ||
381 | * Fout from synthesizer can be given from below equations: | ||
382 | * Fout= Fin/((2 ^ (N+1)) * (M+1)) | ||
383 | */ | ||
384 | void gpt_clk_recalc(struct clk *clk) | ||
385 | { | ||
386 | struct aux_clk_config *config = clk->private_data; | ||
387 | struct pclk_info *pclk_info = NULL; | ||
388 | unsigned int div = 1, val; | ||
389 | unsigned long flags; | ||
390 | |||
391 | pclk_info = pclk_info_get(clk); | ||
392 | if (!pclk_info) { | ||
393 | spin_lock_irqsave(&clocks_lock, flags); | ||
394 | clk->pclk = NULL; | ||
395 | clk->rate = 0; | ||
396 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
397 | return; | ||
398 | } | ||
399 | |||
400 | change_parent(clk, pclk_info->pclk); | ||
401 | |||
402 | spin_lock_irqsave(&clocks_lock, flags); | ||
403 | if (pclk_info->scalable) { | ||
404 | val = readl(config->synth_reg); | ||
405 | div += (val >> GPT_MSCALE_SHIFT) & GPT_MSCALE_MASK; | ||
406 | div *= 1 << (((val >> GPT_NSCALE_SHIFT) & GPT_NSCALE_MASK) + 1); | ||
407 | } | ||
408 | |||
409 | clk->rate = (unsigned long)clk->pclk->rate / div; | ||
410 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
411 | } | ||
412 | |||
413 | /* | ||
414 | * Used for clocks that always have same value as the parent clock divided by a | ||
415 | * fixed divisor | ||
416 | */ | ||
417 | void follow_parent(struct clk *clk) | ||
418 | { | ||
419 | unsigned long flags; | ||
420 | |||
421 | spin_lock_irqsave(&clocks_lock, flags); | ||
422 | clk->rate = clk->pclk->rate; | ||
423 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
424 | } | ||
425 | |||
426 | /** | ||
427 | * recalc_root_clocks - recalculate and propagate all root clocks | ||
428 | * | ||
429 | * Recalculates all root clocks (clocks with no parent), which if the | ||
430 | * clock's .recalc is set correctly, should also propagate their rates. | ||
431 | */ | ||
432 | void recalc_root_clocks(void) | ||
433 | { | ||
434 | propagate_rate(&root_clks); | ||
435 | } | ||
diff --git a/arch/arm/plat-spear/include/plat/clkdev.h b/arch/arm/plat-spear/include/plat/clkdev.h new file mode 100644 index 000000000000..a2d0112fcaf7 --- /dev/null +++ b/arch/arm/plat-spear/include/plat/clkdev.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/clkdev.h | ||
3 | * | ||
4 | * Clock Dev framework definitions for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_CLKDEV_H | ||
15 | #define __PLAT_CLKDEV_H | ||
16 | |||
17 | #define __clk_get(clk) ({ 1; }) | ||
18 | #define __clk_put(clk) do { } while (0) | ||
19 | |||
20 | #endif /* __PLAT_CLKDEV_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/clock.h b/arch/arm/plat-spear/include/plat/clock.h new file mode 100644 index 000000000000..298bafc0a52f --- /dev/null +++ b/arch/arm/plat-spear/include/plat/clock.h | |||
@@ -0,0 +1,126 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/clock.h | ||
3 | * | ||
4 | * Clock framework definitions for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_CLOCK_H | ||
15 | #define __PLAT_CLOCK_H | ||
16 | |||
17 | #include <linux/list.h> | ||
18 | #include <asm/clkdev.h> | ||
19 | #include <linux/types.h> | ||
20 | |||
21 | /* clk structure flags */ | ||
22 | #define ALWAYS_ENABLED (1 << 0) /* clock always enabled */ | ||
23 | #define RESET_TO_ENABLE (1 << 1) /* reset register bit to enable clk */ | ||
24 | |||
25 | /** | ||
26 | * struct clkops - clock operations | ||
27 | * @enable: pointer to clock enable function | ||
28 | * @disable: pointer to clock disable function | ||
29 | */ | ||
30 | struct clkops { | ||
31 | int (*enable) (struct clk *); | ||
32 | void (*disable) (struct clk *); | ||
33 | }; | ||
34 | |||
35 | /** | ||
36 | * struct pclk_info - parents info | ||
37 | * @pclk: pointer to parent clk | ||
38 | * @pclk_mask: value to be written for selecting this parent | ||
39 | * @scalable: Is parent scalable (1 - YES, 0 - NO) | ||
40 | */ | ||
41 | struct pclk_info { | ||
42 | struct clk *pclk; | ||
43 | u8 pclk_mask; | ||
44 | u8 scalable; | ||
45 | }; | ||
46 | |||
47 | /** | ||
48 | * struct pclk_sel - parents selection configuration | ||
49 | * @pclk_info: pointer to array of parent clock info | ||
50 | * @pclk_count: number of parents | ||
51 | * @pclk_sel_reg: register for selecting a parent | ||
52 | * @pclk_sel_mask: mask for selecting parent (can be used to clear bits also) | ||
53 | */ | ||
54 | struct pclk_sel { | ||
55 | struct pclk_info *pclk_info; | ||
56 | u8 pclk_count; | ||
57 | unsigned int *pclk_sel_reg; | ||
58 | unsigned int pclk_sel_mask; | ||
59 | }; | ||
60 | |||
61 | /** | ||
62 | * struct clk - clock structure | ||
63 | * @usage_count: num of users who enabled this clock | ||
64 | * @flags: flags for clock properties | ||
65 | * @rate: programmed clock rate in Hz | ||
66 | * @en_reg: clk enable/disable reg | ||
67 | * @en_reg_bit: clk enable/disable bit | ||
68 | * @ops: clk enable/disable ops - generic_clkops selected if NULL | ||
69 | * @recalc: pointer to clock rate recalculate function | ||
70 | * @pclk: current parent clk | ||
71 | * @pclk_sel: pointer to parent selection structure | ||
72 | * @pclk_sel_shift: register shift for selecting parent of this clock | ||
73 | * @children: list for childrens or this clock | ||
74 | * @sibling: node for list of clocks having same parents | ||
75 | * @private_data: clock specific private data | ||
76 | */ | ||
77 | struct clk { | ||
78 | unsigned int usage_count; | ||
79 | unsigned int flags; | ||
80 | unsigned long rate; | ||
81 | unsigned int *en_reg; | ||
82 | u8 en_reg_bit; | ||
83 | const struct clkops *ops; | ||
84 | void (*recalc) (struct clk *); | ||
85 | |||
86 | struct clk *pclk; | ||
87 | struct pclk_sel *pclk_sel; | ||
88 | unsigned int pclk_sel_shift; | ||
89 | |||
90 | struct list_head children; | ||
91 | struct list_head sibling; | ||
92 | void *private_data; | ||
93 | }; | ||
94 | |||
95 | /* pll configuration structure */ | ||
96 | struct pll_clk_config { | ||
97 | unsigned int *mode_reg; | ||
98 | unsigned int *cfg_reg; | ||
99 | }; | ||
100 | |||
101 | /* ahb and apb bus configuration structure */ | ||
102 | struct bus_clk_config { | ||
103 | unsigned int *reg; | ||
104 | unsigned int mask; | ||
105 | unsigned int shift; | ||
106 | }; | ||
107 | |||
108 | /* | ||
109 | * Aux clk configuration structure: applicable to GPT, UART and FIRDA | ||
110 | */ | ||
111 | struct aux_clk_config { | ||
112 | unsigned int *synth_reg; | ||
113 | }; | ||
114 | |||
115 | /* platform specific clock functions */ | ||
116 | void clk_register(struct clk_lookup *cl); | ||
117 | void recalc_root_clocks(void); | ||
118 | |||
119 | /* clock recalc functions */ | ||
120 | void follow_parent(struct clk *clk); | ||
121 | void pll1_clk_recalc(struct clk *clk); | ||
122 | void bus_clk_recalc(struct clk *clk); | ||
123 | void gpt_clk_recalc(struct clk *clk); | ||
124 | void aux_clk_recalc(struct clk *clk); | ||
125 | |||
126 | #endif /* __PLAT_CLOCK_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/debug-macro.S b/arch/arm/plat-spear/include/plat/debug-macro.S new file mode 100644 index 000000000000..1670734b7e51 --- /dev/null +++ b/arch/arm/plat-spear/include/plat/debug-macro.S | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header for spear platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/amba/serial.h> | ||
15 | #include <mach/spear.h> | ||
16 | |||
17 | .macro addruart, rx | ||
18 | mrc p15, 0, \rx, c1, c0 | ||
19 | tst \rx, #1 @ MMU enabled? | ||
20 | moveq \rx, =SPEAR_DBG_UART_BASE @ Physical base | ||
21 | movne \rx, =VA_SPEAR_DBG_UART_BASE @ Virtual base | ||
22 | .endm | ||
23 | |||
24 | .macro senduart, rd, rx | ||
25 | strb \rd, [\rx, #UART01x_DR] @ ASC_TX_BUFFER | ||
26 | .endm | ||
27 | |||
28 | .macro waituart, rd, rx | ||
29 | 1001: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER | ||
30 | tst \rd, #UART01x_FR_TXFF @ TX_FULL | ||
31 | bne 1001b | ||
32 | .endm | ||
33 | |||
34 | .macro busyuart, rd, rx | ||
35 | 1002: ldr \rd, [\rx, #UART01x_FR] @ FLAG REGISTER | ||
36 | tst \rd, #UART011_FR_TXFE @ TX_EMPTY | ||
37 | beq 1002b | ||
38 | .endm | ||
diff --git a/arch/arm/plat-spear/include/plat/gpio.h b/arch/arm/plat-spear/include/plat/gpio.h new file mode 100644 index 000000000000..b857c91257dd --- /dev/null +++ b/arch/arm/plat-spear/include/plat/gpio.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/gpio.h | ||
3 | * | ||
4 | * GPIO macros for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_GPIO_H | ||
15 | #define __PLAT_GPIO_H | ||
16 | |||
17 | #include <asm-generic/gpio.h> | ||
18 | |||
19 | #define gpio_get_value __gpio_get_value | ||
20 | #define gpio_set_value __gpio_set_value | ||
21 | #define gpio_cansleep __gpio_cansleep | ||
22 | #define gpio_to_irq __gpio_to_irq | ||
23 | |||
24 | #endif /* __PLAT_GPIO_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/io.h b/arch/arm/plat-spear/include/plat/io.h new file mode 100644 index 000000000000..4d4ba822b3eb --- /dev/null +++ b/arch/arm/plat-spear/include/plat/io.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/io.h | ||
3 | * | ||
4 | * IO definitions for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_IO_H | ||
15 | #define __PLAT_IO_H | ||
16 | |||
17 | #define IO_SPACE_LIMIT 0xFFFFFFFF | ||
18 | |||
19 | #define __io(a) __typesafe_io(a) | ||
20 | #define __mem_pci(a) (a) | ||
21 | |||
22 | #endif /* __PLAT_IO_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/memory.h b/arch/arm/plat-spear/include/plat/memory.h new file mode 100644 index 000000000000..27a4aba77343 --- /dev/null +++ b/arch/arm/plat-spear/include/plat/memory.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/memory.h | ||
3 | * | ||
4 | * Memory map for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_MEMORY_H | ||
15 | #define __PLAT_MEMORY_H | ||
16 | |||
17 | /* Physical DRAM offset */ | ||
18 | #define PHYS_OFFSET UL(0x00000000) | ||
19 | |||
20 | #endif /* __PLAT_MEMORY_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/padmux.h b/arch/arm/plat-spear/include/plat/padmux.h new file mode 100644 index 000000000000..877f3adcf610 --- /dev/null +++ b/arch/arm/plat-spear/include/plat/padmux.h | |||
@@ -0,0 +1,92 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/padmux.h | ||
3 | * | ||
4 | * SPEAr platform specific gpio pads muxing file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_PADMUX_H | ||
15 | #define __PLAT_PADMUX_H | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | |||
19 | /* | ||
20 | * struct pmx_reg: configuration structure for mode reg and mux reg | ||
21 | * | ||
22 | * offset: offset of mode reg | ||
23 | * mask: mask of mode reg | ||
24 | */ | ||
25 | struct pmx_reg { | ||
26 | u32 offset; | ||
27 | u32 mask; | ||
28 | }; | ||
29 | |||
30 | /* | ||
31 | * struct pmx_dev_mode: configuration structure every group of modes of a device | ||
32 | * | ||
33 | * ids: all modes for this configuration | ||
34 | * mask: mask for supported mode | ||
35 | */ | ||
36 | struct pmx_dev_mode { | ||
37 | u32 ids; | ||
38 | u32 mask; | ||
39 | }; | ||
40 | |||
41 | /* | ||
42 | * struct pmx_mode: mode definition structure | ||
43 | * | ||
44 | * name: mode name | ||
45 | * mask: mode mask | ||
46 | */ | ||
47 | struct pmx_mode { | ||
48 | char *name; | ||
49 | u32 id; | ||
50 | u32 mask; | ||
51 | }; | ||
52 | |||
53 | /* | ||
54 | * struct pmx_dev: device definition structure | ||
55 | * | ||
56 | * name: device name | ||
57 | * modes: device configuration array for different modes supported | ||
58 | * mode_count: size of modes array | ||
59 | * is_active: is peripheral active/enabled | ||
60 | * enb_on_reset: if 1, mask bits to be cleared in reg otherwise to be set in reg | ||
61 | */ | ||
62 | struct pmx_dev { | ||
63 | char *name; | ||
64 | struct pmx_dev_mode *modes; | ||
65 | u8 mode_count; | ||
66 | bool is_active; | ||
67 | bool enb_on_reset; | ||
68 | }; | ||
69 | |||
70 | /* | ||
71 | * struct pmx_driver: driver definition structure | ||
72 | * | ||
73 | * mode: mode to be set | ||
74 | * devs: array of pointer to pmx devices | ||
75 | * devs_count: ARRAY_SIZE of devs | ||
76 | * base: base address of soc config registers | ||
77 | * mode_reg: structure of mode config register | ||
78 | * mux_reg: structure of device mux config register | ||
79 | */ | ||
80 | struct pmx_driver { | ||
81 | struct pmx_mode *mode; | ||
82 | struct pmx_dev **devs; | ||
83 | u8 devs_count; | ||
84 | u32 *base; | ||
85 | struct pmx_reg mode_reg; | ||
86 | struct pmx_reg mux_reg; | ||
87 | }; | ||
88 | |||
89 | /* pmx functions */ | ||
90 | int pmx_register(struct pmx_driver *driver); | ||
91 | |||
92 | #endif /* __PLAT_PADMUX_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/shirq.h b/arch/arm/plat-spear/include/plat/shirq.h new file mode 100644 index 000000000000..03ed8b585dcf --- /dev/null +++ b/arch/arm/plat-spear/include/plat/shirq.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/shirq.h | ||
3 | * | ||
4 | * SPEAr platform shared irq layer header file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_SHIRQ_H | ||
15 | #define __PLAT_SHIRQ_H | ||
16 | |||
17 | #include <linux/irq.h> | ||
18 | #include <linux/types.h> | ||
19 | |||
20 | /* | ||
21 | * struct shirq_dev_config: shared irq device configuration | ||
22 | * | ||
23 | * virq: virtual irq number of device | ||
24 | * enb_mask: enable mask of device | ||
25 | * status_mask: status mask of device | ||
26 | * clear_mask: clear mask of device | ||
27 | */ | ||
28 | struct shirq_dev_config { | ||
29 | u32 virq; | ||
30 | u32 enb_mask; | ||
31 | u32 status_mask; | ||
32 | u32 clear_mask; | ||
33 | }; | ||
34 | |||
35 | /* | ||
36 | * struct shirq_regs: shared irq register configuration | ||
37 | * | ||
38 | * base: base address of shared irq register | ||
39 | * enb_reg: enable register offset | ||
40 | * reset_to_enb: val 1 indicates, we need to clear bit for enabling interrupt | ||
41 | * status_reg: status register offset | ||
42 | * status_reg_mask: status register valid mask | ||
43 | * clear_reg: clear register offset | ||
44 | * reset_to_clear: val 1 indicates, we need to clear bit for clearing interrupt | ||
45 | */ | ||
46 | struct shirq_regs { | ||
47 | void __iomem *base; | ||
48 | u32 enb_reg; | ||
49 | u32 reset_to_enb; | ||
50 | u32 status_reg; | ||
51 | u32 status_reg_mask; | ||
52 | u32 clear_reg; | ||
53 | u32 reset_to_clear; | ||
54 | }; | ||
55 | |||
56 | /* | ||
57 | * struct spear_shirq: shared irq structure | ||
58 | * | ||
59 | * irq: hardware irq number | ||
60 | * dev_config: array of device config structures which are using "irq" line | ||
61 | * dev_count: size of dev_config array | ||
62 | * regs: register configuration for shared irq block | ||
63 | */ | ||
64 | struct spear_shirq { | ||
65 | u32 irq; | ||
66 | struct shirq_dev_config *dev_config; | ||
67 | u32 dev_count; | ||
68 | struct shirq_regs regs; | ||
69 | }; | ||
70 | |||
71 | int spear_shirq_register(struct spear_shirq *shirq); | ||
72 | |||
73 | #endif /* __PLAT_SHIRQ_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h new file mode 100644 index 000000000000..55a4e405d578 --- /dev/null +++ b/arch/arm/plat-spear/include/plat/system.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/system.h | ||
3 | * | ||
4 | * SPEAr platform specific architecture functions | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_SYSTEM_H | ||
15 | #define __PLAT_SYSTEM_H | ||
16 | |||
17 | #include <asm/hardware/sp810.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <mach/spear.h> | ||
20 | |||
21 | static inline void arch_idle(void) | ||
22 | { | ||
23 | /* | ||
24 | * This should do all the clock switching | ||
25 | * and wait for interrupt tricks | ||
26 | */ | ||
27 | cpu_do_idle(); | ||
28 | } | ||
29 | |||
30 | static inline void arch_reset(char mode, const char *cmd) | ||
31 | { | ||
32 | if (mode == 's') { | ||
33 | /* software reset, Jump into ROM at address 0 */ | ||
34 | cpu_reset(0); | ||
35 | } else { | ||
36 | /* hardware reset, Use on-chip reset capability */ | ||
37 | sysctl_soft_reset((void __iomem *)VA_SPEAR_SYS_CTRL_BASE); | ||
38 | } | ||
39 | } | ||
40 | |||
41 | #endif /* __PLAT_SYSTEM_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/timex.h b/arch/arm/plat-spear/include/plat/timex.h new file mode 100644 index 000000000000..914d09dd50fd --- /dev/null +++ b/arch/arm/plat-spear/include/plat/timex.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/timex.h | ||
3 | * | ||
4 | * SPEAr platform specific timex definitions | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_TIMEX_H | ||
15 | #define __PLAT_TIMEX_H | ||
16 | |||
17 | #define CLOCK_TICK_RATE 48000000 | ||
18 | |||
19 | #endif /* __PLAT_TIMEX_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/uncompress.h b/arch/arm/plat-spear/include/plat/uncompress.h new file mode 100644 index 000000000000..99ba6789cc97 --- /dev/null +++ b/arch/arm/plat-spear/include/plat/uncompress.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/uncompress.h | ||
3 | * | ||
4 | * Serial port stubs for kernel decompress status messages | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/io.h> | ||
15 | #include <linux/amba/serial.h> | ||
16 | #include <mach/spear.h> | ||
17 | |||
18 | #ifndef __PLAT_UNCOMPRESS_H | ||
19 | #define __PLAT_UNCOMPRESS_H | ||
20 | /* | ||
21 | * This does not append a newline | ||
22 | */ | ||
23 | static inline void putc(int c) | ||
24 | { | ||
25 | void __iomem *base = (void __iomem *)SPEAR_DBG_UART_BASE; | ||
26 | |||
27 | while (readl(base + UART01x_FR) & UART01x_FR_TXFF) | ||
28 | barrier(); | ||
29 | |||
30 | writel(c, base + UART01x_DR); | ||
31 | } | ||
32 | |||
33 | static inline void flush(void) | ||
34 | { | ||
35 | } | ||
36 | |||
37 | /* | ||
38 | * nothing to do | ||
39 | */ | ||
40 | #define arch_decomp_setup() | ||
41 | #define arch_decomp_wdog() | ||
42 | |||
43 | #endif /* __PLAT_UNCOMPRESS_H */ | ||
diff --git a/arch/arm/plat-spear/include/plat/vmalloc.h b/arch/arm/plat-spear/include/plat/vmalloc.h new file mode 100644 index 000000000000..09e9372aea21 --- /dev/null +++ b/arch/arm/plat-spear/include/plat/vmalloc.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/vmalloc.h | ||
3 | * | ||
4 | * Defining Vmalloc area for SPEAr platform | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PLAT_VMALLOC_H | ||
15 | #define __PLAT_VMALLOC_H | ||
16 | |||
17 | #define VMALLOC_END 0xF0000000 | ||
18 | |||
19 | #endif /* __PLAT_VMALLOC_H */ | ||
diff --git a/arch/arm/plat-spear/padmux.c b/arch/arm/plat-spear/padmux.c new file mode 100644 index 000000000000..d2aab3adcdeb --- /dev/null +++ b/arch/arm/plat-spear/padmux.c | |||
@@ -0,0 +1,164 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/include/plat/padmux.c | ||
3 | * | ||
4 | * SPEAr platform specific gpio pads muxing source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/err.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/slab.h> | ||
17 | #include <plat/padmux.h> | ||
18 | |||
19 | /* | ||
20 | * struct pmx: pmx definition structure | ||
21 | * | ||
22 | * base: base address of configuration registers | ||
23 | * mode_reg: mode configurations | ||
24 | * mux_reg: muxing configurations | ||
25 | * active_mode: pointer to current active mode | ||
26 | */ | ||
27 | struct pmx { | ||
28 | u32 base; | ||
29 | struct pmx_reg mode_reg; | ||
30 | struct pmx_reg mux_reg; | ||
31 | struct pmx_mode *active_mode; | ||
32 | }; | ||
33 | |||
34 | static struct pmx *pmx; | ||
35 | |||
36 | /** | ||
37 | * pmx_mode_set - Enables an multiplexing mode | ||
38 | * @mode - pointer to pmx mode | ||
39 | * | ||
40 | * It will set mode of operation in hardware. | ||
41 | * Returns -ve on Err otherwise 0 | ||
42 | */ | ||
43 | static int pmx_mode_set(struct pmx_mode *mode) | ||
44 | { | ||
45 | u32 val; | ||
46 | |||
47 | if (!mode->name) | ||
48 | return -EFAULT; | ||
49 | |||
50 | pmx->active_mode = mode; | ||
51 | |||
52 | val = readl(pmx->base + pmx->mode_reg.offset); | ||
53 | val &= ~pmx->mode_reg.mask; | ||
54 | val |= mode->mask & pmx->mode_reg.mask; | ||
55 | writel(val, pmx->base + pmx->mode_reg.offset); | ||
56 | |||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * pmx_devs_enable - Enables list of devices | ||
62 | * @devs - pointer to pmx device array | ||
63 | * @count - number of devices to enable | ||
64 | * | ||
65 | * It will enable pads for all required peripherals once and only once. | ||
66 | * If peripheral is not supported by current mode then request is rejected. | ||
67 | * Conflicts between peripherals are not handled and peripherals will be | ||
68 | * enabled in the order they are present in pmx_dev array. | ||
69 | * In case of conflicts last peripheral enalbed will be present. | ||
70 | * Returns -ve on Err otherwise 0 | ||
71 | */ | ||
72 | static int pmx_devs_enable(struct pmx_dev **devs, u8 count) | ||
73 | { | ||
74 | u32 val, i, mask; | ||
75 | |||
76 | if (!count) | ||
77 | return -EINVAL; | ||
78 | |||
79 | val = readl(pmx->base + pmx->mux_reg.offset); | ||
80 | for (i = 0; i < count; i++) { | ||
81 | u8 j = 0; | ||
82 | |||
83 | if (!devs[i]->name || !devs[i]->modes) { | ||
84 | printk(KERN_ERR "padmux: dev name or modes is null\n"); | ||
85 | continue; | ||
86 | } | ||
87 | /* check if peripheral exists in active mode */ | ||
88 | if (pmx->active_mode) { | ||
89 | bool found = false; | ||
90 | for (j = 0; j < devs[i]->mode_count; j++) { | ||
91 | if (devs[i]->modes[j].ids & | ||
92 | pmx->active_mode->id) { | ||
93 | found = true; | ||
94 | break; | ||
95 | } | ||
96 | } | ||
97 | if (found == false) { | ||
98 | printk(KERN_ERR "%s device not available in %s"\ | ||
99 | "mode\n", devs[i]->name, | ||
100 | pmx->active_mode->name); | ||
101 | continue; | ||
102 | } | ||
103 | } | ||
104 | |||
105 | /* enable peripheral */ | ||
106 | mask = devs[i]->modes[j].mask & pmx->mux_reg.mask; | ||
107 | if (devs[i]->enb_on_reset) | ||
108 | val &= ~mask; | ||
109 | else | ||
110 | val |= mask; | ||
111 | |||
112 | devs[i]->is_active = true; | ||
113 | } | ||
114 | writel(val, pmx->base + pmx->mux_reg.offset); | ||
115 | kfree(pmx); | ||
116 | |||
117 | /* this will ensure that multiplexing can't be changed now */ | ||
118 | pmx = (struct pmx *)-1; | ||
119 | |||
120 | return 0; | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * pmx_register - registers a platform requesting pad mux feature | ||
125 | * @driver - pointer to driver structure containing driver specific parameters | ||
126 | * | ||
127 | * Also this must be called only once. This will allocate memory for pmx | ||
128 | * structure, will call pmx_mode_set, will call pmx_devs_enable. | ||
129 | * Returns -ve on Err otherwise 0 | ||
130 | */ | ||
131 | int pmx_register(struct pmx_driver *driver) | ||
132 | { | ||
133 | int ret = 0; | ||
134 | |||
135 | if (pmx) | ||
136 | return -EPERM; | ||
137 | if (!driver->base || !driver->devs) | ||
138 | return -EFAULT; | ||
139 | |||
140 | pmx = kzalloc(sizeof(*pmx), GFP_KERNEL); | ||
141 | if (!pmx) | ||
142 | return -ENOMEM; | ||
143 | |||
144 | pmx->base = (u32)driver->base; | ||
145 | pmx->mode_reg.offset = driver->mode_reg.offset; | ||
146 | pmx->mode_reg.mask = driver->mode_reg.mask; | ||
147 | pmx->mux_reg.offset = driver->mux_reg.offset; | ||
148 | pmx->mux_reg.mask = driver->mux_reg.mask; | ||
149 | |||
150 | /* choose mode to enable */ | ||
151 | if (driver->mode) { | ||
152 | ret = pmx_mode_set(driver->mode); | ||
153 | if (ret) | ||
154 | goto pmx_fail; | ||
155 | } | ||
156 | ret = pmx_devs_enable(driver->devs, driver->devs_count); | ||
157 | if (ret) | ||
158 | goto pmx_fail; | ||
159 | |||
160 | return 0; | ||
161 | |||
162 | pmx_fail: | ||
163 | return ret; | ||
164 | } | ||
diff --git a/arch/arm/plat-spear/shirq.c b/arch/arm/plat-spear/shirq.c new file mode 100644 index 000000000000..2172d6946aea --- /dev/null +++ b/arch/arm/plat-spear/shirq.c | |||
@@ -0,0 +1,118 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/shirq.c | ||
3 | * | ||
4 | * SPEAr platform shared irq layer source file | ||
5 | * | ||
6 | * Copyright (C) 2009 ST Microelectronics | ||
7 | * Viresh Kumar<viresh.kumar@st.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/err.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/irq.h> | ||
17 | #include <linux/spinlock.h> | ||
18 | #include <plat/shirq.h> | ||
19 | |||
20 | struct spear_shirq *shirq; | ||
21 | static DEFINE_SPINLOCK(lock); | ||
22 | |||
23 | static void shirq_irq_mask(unsigned irq) | ||
24 | { | ||
25 | struct spear_shirq *shirq = get_irq_chip_data(irq); | ||
26 | u32 val, id = irq - shirq->dev_config[0].virq; | ||
27 | unsigned long flags; | ||
28 | |||
29 | if ((shirq->regs.enb_reg == -1) || shirq->dev_config[id].enb_mask == -1) | ||
30 | return; | ||
31 | |||
32 | spin_lock_irqsave(&lock, flags); | ||
33 | val = readl(shirq->regs.base + shirq->regs.enb_reg); | ||
34 | if (shirq->regs.reset_to_enb) | ||
35 | val |= shirq->dev_config[id].enb_mask; | ||
36 | else | ||
37 | val &= ~(shirq->dev_config[id].enb_mask); | ||
38 | writel(val, shirq->regs.base + shirq->regs.enb_reg); | ||
39 | spin_unlock_irqrestore(&lock, flags); | ||
40 | } | ||
41 | |||
42 | static void shirq_irq_unmask(unsigned irq) | ||
43 | { | ||
44 | struct spear_shirq *shirq = get_irq_chip_data(irq); | ||
45 | u32 val, id = irq - shirq->dev_config[0].virq; | ||
46 | unsigned long flags; | ||
47 | |||
48 | if ((shirq->regs.enb_reg == -1) || shirq->dev_config[id].enb_mask == -1) | ||
49 | return; | ||
50 | |||
51 | spin_lock_irqsave(&lock, flags); | ||
52 | val = readl(shirq->regs.base + shirq->regs.enb_reg); | ||
53 | if (shirq->regs.reset_to_enb) | ||
54 | val &= ~(shirq->dev_config[id].enb_mask); | ||
55 | else | ||
56 | val |= shirq->dev_config[id].enb_mask; | ||
57 | writel(val, shirq->regs.base + shirq->regs.enb_reg); | ||
58 | spin_unlock_irqrestore(&lock, flags); | ||
59 | } | ||
60 | |||
61 | static struct irq_chip shirq_chip = { | ||
62 | .name = "spear_shirq", | ||
63 | .ack = shirq_irq_mask, | ||
64 | .mask = shirq_irq_mask, | ||
65 | .unmask = shirq_irq_unmask, | ||
66 | }; | ||
67 | |||
68 | static void shirq_handler(unsigned irq, struct irq_desc *desc) | ||
69 | { | ||
70 | u32 i, val, mask; | ||
71 | struct spear_shirq *shirq = get_irq_data(irq); | ||
72 | |||
73 | desc->chip->ack(irq); | ||
74 | while ((val = readl(shirq->regs.base + shirq->regs.status_reg) & | ||
75 | shirq->regs.status_reg_mask)) { | ||
76 | for (i = 0; (i < shirq->dev_count) && val; i++) { | ||
77 | if (!(shirq->dev_config[i].status_mask & val)) | ||
78 | continue; | ||
79 | |||
80 | generic_handle_irq(shirq->dev_config[i].virq); | ||
81 | |||
82 | /* clear interrupt */ | ||
83 | val &= ~shirq->dev_config[i].status_mask; | ||
84 | if ((shirq->regs.clear_reg == -1) || | ||
85 | shirq->dev_config[i].clear_mask == -1) | ||
86 | continue; | ||
87 | mask = readl(shirq->regs.base + shirq->regs.clear_reg); | ||
88 | if (shirq->regs.reset_to_clear) | ||
89 | mask &= ~shirq->dev_config[i].clear_mask; | ||
90 | else | ||
91 | mask |= shirq->dev_config[i].clear_mask; | ||
92 | writel(mask, shirq->regs.base + shirq->regs.clear_reg); | ||
93 | } | ||
94 | } | ||
95 | desc->chip->unmask(irq); | ||
96 | } | ||
97 | |||
98 | int spear_shirq_register(struct spear_shirq *shirq) | ||
99 | { | ||
100 | int i; | ||
101 | |||
102 | if (!shirq || !shirq->dev_config || !shirq->regs.base) | ||
103 | return -EFAULT; | ||
104 | |||
105 | if (!shirq->dev_count) | ||
106 | return -EINVAL; | ||
107 | |||
108 | set_irq_chained_handler(shirq->irq, shirq_handler); | ||
109 | for (i = 0; i < shirq->dev_count; i++) { | ||
110 | set_irq_chip(shirq->dev_config[i].virq, &shirq_chip); | ||
111 | set_irq_handler(shirq->dev_config[i].virq, handle_simple_irq); | ||
112 | set_irq_flags(shirq->dev_config[i].virq, IRQF_VALID); | ||
113 | set_irq_chip_data(shirq->dev_config[i].virq, shirq); | ||
114 | } | ||
115 | |||
116 | set_irq_data(shirq->irq, shirq); | ||
117 | return 0; | ||
118 | } | ||
diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c new file mode 100644 index 000000000000..a1025d38f383 --- /dev/null +++ b/arch/arm/plat-spear/time.c | |||
@@ -0,0 +1,292 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-spear/time.c | ||
3 | * | ||
4 | * Copyright (C) 2009 ST Microelectronics | ||
5 | * Shiraz Hashim<shiraz.hashim@st.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #include <linux/clk.h> | ||
13 | #include <linux/clockchips.h> | ||
14 | #include <linux/clocksource.h> | ||
15 | #include <linux/err.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/time.h> | ||
21 | #include <linux/irq.h> | ||
22 | #include <asm/mach/time.h> | ||
23 | #include <mach/irqs.h> | ||
24 | #include <mach/hardware.h> | ||
25 | #include <mach/spear.h> | ||
26 | #include <mach/generic.h> | ||
27 | |||
28 | /* | ||
29 | * We would use TIMER0 and TIMER1 as clockevent and clocksource. | ||
30 | * Timer0 and Timer1 both belong to same gpt block in cpu subbsystem. Further | ||
31 | * they share same functional clock. Any change in one's functional clock will | ||
32 | * also affect other timer. | ||
33 | */ | ||
34 | |||
35 | #define CLKEVT 0 /* gpt0, channel0 as clockevent */ | ||
36 | #define CLKSRC 1 /* gpt0, channel1 as clocksource */ | ||
37 | |||
38 | /* Register offsets, x is channel number */ | ||
39 | #define CR(x) ((x) * 0x80 + 0x80) | ||
40 | #define IR(x) ((x) * 0x80 + 0x84) | ||
41 | #define LOAD(x) ((x) * 0x80 + 0x88) | ||
42 | #define COUNT(x) ((x) * 0x80 + 0x8C) | ||
43 | |||
44 | /* Reg bit definitions */ | ||
45 | #define CTRL_INT_ENABLE 0x0100 | ||
46 | #define CTRL_ENABLE 0x0020 | ||
47 | #define CTRL_ONE_SHOT 0x0010 | ||
48 | |||
49 | #define CTRL_PRESCALER1 0x0 | ||
50 | #define CTRL_PRESCALER2 0x1 | ||
51 | #define CTRL_PRESCALER4 0x2 | ||
52 | #define CTRL_PRESCALER8 0x3 | ||
53 | #define CTRL_PRESCALER16 0x4 | ||
54 | #define CTRL_PRESCALER32 0x5 | ||
55 | #define CTRL_PRESCALER64 0x6 | ||
56 | #define CTRL_PRESCALER128 0x7 | ||
57 | #define CTRL_PRESCALER256 0x8 | ||
58 | |||
59 | #define INT_STATUS 0x1 | ||
60 | |||
61 | static __iomem void *gpt_base; | ||
62 | static struct clk *gpt_clk; | ||
63 | |||
64 | static void clockevent_set_mode(enum clock_event_mode mode, | ||
65 | struct clock_event_device *clk_event_dev); | ||
66 | static int clockevent_next_event(unsigned long evt, | ||
67 | struct clock_event_device *clk_event_dev); | ||
68 | |||
69 | /* | ||
70 | * Following clocksource_set_clock and clockevent_set_clock picked | ||
71 | * from arch/mips/kernel/time.c | ||
72 | */ | ||
73 | |||
74 | void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) | ||
75 | { | ||
76 | u64 temp; | ||
77 | u32 shift; | ||
78 | |||
79 | /* Find a shift value */ | ||
80 | for (shift = 32; shift > 0; shift--) { | ||
81 | temp = (u64) NSEC_PER_SEC << shift; | ||
82 | do_div(temp, clock); | ||
83 | if ((temp >> 32) == 0) | ||
84 | break; | ||
85 | } | ||
86 | cs->shift = shift; | ||
87 | cs->mult = (u32) temp; | ||
88 | } | ||
89 | |||
90 | void __init clockevent_set_clock(struct clock_event_device *cd, | ||
91 | unsigned int clock) | ||
92 | { | ||
93 | u64 temp; | ||
94 | u32 shift; | ||
95 | |||
96 | /* Find a shift value */ | ||
97 | for (shift = 32; shift > 0; shift--) { | ||
98 | temp = (u64) clock << shift; | ||
99 | do_div(temp, NSEC_PER_SEC); | ||
100 | if ((temp >> 32) == 0) | ||
101 | break; | ||
102 | } | ||
103 | cd->shift = shift; | ||
104 | cd->mult = (u32) temp; | ||
105 | } | ||
106 | |||
107 | static cycle_t clocksource_read_cycles(struct clocksource *cs) | ||
108 | { | ||
109 | return (cycle_t) readw(gpt_base + COUNT(CLKSRC)); | ||
110 | } | ||
111 | |||
112 | static struct clocksource clksrc = { | ||
113 | .name = "tmr1", | ||
114 | .rating = 200, /* its a pretty decent clock */ | ||
115 | .read = clocksource_read_cycles, | ||
116 | .mask = 0xFFFF, /* 16 bits */ | ||
117 | .mult = 0, /* to be computed */ | ||
118 | .shift = 0, /* to be computed */ | ||
119 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
120 | }; | ||
121 | |||
122 | static void spear_clocksource_init(void) | ||
123 | { | ||
124 | u32 tick_rate; | ||
125 | u16 val; | ||
126 | |||
127 | /* program the prescaler (/256)*/ | ||
128 | writew(CTRL_PRESCALER256, gpt_base + CR(CLKSRC)); | ||
129 | |||
130 | /* find out actual clock driving Timer */ | ||
131 | tick_rate = clk_get_rate(gpt_clk); | ||
132 | tick_rate >>= CTRL_PRESCALER256; | ||
133 | |||
134 | writew(0xFFFF, gpt_base + LOAD(CLKSRC)); | ||
135 | |||
136 | val = readw(gpt_base + CR(CLKSRC)); | ||
137 | val &= ~CTRL_ONE_SHOT; /* autoreload mode */ | ||
138 | val |= CTRL_ENABLE ; | ||
139 | writew(val, gpt_base + CR(CLKSRC)); | ||
140 | |||
141 | clocksource_set_clock(&clksrc, tick_rate); | ||
142 | |||
143 | /* register the clocksource */ | ||
144 | clocksource_register(&clksrc); | ||
145 | } | ||
146 | |||
147 | static struct clock_event_device clkevt = { | ||
148 | .name = "tmr0", | ||
149 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | ||
150 | .set_mode = clockevent_set_mode, | ||
151 | .set_next_event = clockevent_next_event, | ||
152 | .shift = 0, /* to be computed */ | ||
153 | }; | ||
154 | |||
155 | static void clockevent_set_mode(enum clock_event_mode mode, | ||
156 | struct clock_event_device *clk_event_dev) | ||
157 | { | ||
158 | u32 period; | ||
159 | u16 val; | ||
160 | |||
161 | /* stop the timer */ | ||
162 | val = readw(gpt_base + CR(CLKEVT)); | ||
163 | val &= ~CTRL_ENABLE; | ||
164 | writew(val, gpt_base + CR(CLKEVT)); | ||
165 | |||
166 | switch (mode) { | ||
167 | case CLOCK_EVT_MODE_PERIODIC: | ||
168 | period = clk_get_rate(gpt_clk) / HZ; | ||
169 | period >>= CTRL_PRESCALER16; | ||
170 | writew(period, gpt_base + LOAD(CLKEVT)); | ||
171 | |||
172 | val = readw(gpt_base + CR(CLKEVT)); | ||
173 | val &= ~CTRL_ONE_SHOT; | ||
174 | val |= CTRL_ENABLE | CTRL_INT_ENABLE; | ||
175 | writew(val, gpt_base + CR(CLKEVT)); | ||
176 | |||
177 | break; | ||
178 | case CLOCK_EVT_MODE_ONESHOT: | ||
179 | val = readw(gpt_base + CR(CLKEVT)); | ||
180 | val |= CTRL_ONE_SHOT; | ||
181 | writew(val, gpt_base + CR(CLKEVT)); | ||
182 | |||
183 | break; | ||
184 | case CLOCK_EVT_MODE_UNUSED: | ||
185 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
186 | case CLOCK_EVT_MODE_RESUME: | ||
187 | |||
188 | break; | ||
189 | default: | ||
190 | pr_err("Invalid mode requested\n"); | ||
191 | break; | ||
192 | } | ||
193 | } | ||
194 | |||
195 | static int clockevent_next_event(unsigned long cycles, | ||
196 | struct clock_event_device *clk_event_dev) | ||
197 | { | ||
198 | u16 val; | ||
199 | |||
200 | writew(cycles, gpt_base + LOAD(CLKEVT)); | ||
201 | |||
202 | val = readw(gpt_base + CR(CLKEVT)); | ||
203 | val |= CTRL_ENABLE | CTRL_INT_ENABLE; | ||
204 | writew(val, gpt_base + CR(CLKEVT)); | ||
205 | |||
206 | return 0; | ||
207 | } | ||
208 | |||
209 | static irqreturn_t spear_timer_interrupt(int irq, void *dev_id) | ||
210 | { | ||
211 | struct clock_event_device *evt = &clkevt; | ||
212 | |||
213 | writew(INT_STATUS, gpt_base + IR(CLKEVT)); | ||
214 | |||
215 | evt->event_handler(evt); | ||
216 | |||
217 | return IRQ_HANDLED; | ||
218 | } | ||
219 | |||
220 | static struct irqaction spear_timer_irq = { | ||
221 | .name = "timer", | ||
222 | .flags = IRQF_DISABLED | IRQF_TIMER, | ||
223 | .handler = spear_timer_interrupt | ||
224 | }; | ||
225 | |||
226 | static void __init spear_clockevent_init(void) | ||
227 | { | ||
228 | u32 tick_rate; | ||
229 | |||
230 | /* program the prescaler */ | ||
231 | writew(CTRL_PRESCALER16, gpt_base + CR(CLKEVT)); | ||
232 | |||
233 | tick_rate = clk_get_rate(gpt_clk); | ||
234 | tick_rate >>= CTRL_PRESCALER16; | ||
235 | |||
236 | clockevent_set_clock(&clkevt, tick_rate); | ||
237 | |||
238 | clkevt.max_delta_ns = clockevent_delta2ns(0xfff0, | ||
239 | &clkevt); | ||
240 | clkevt.min_delta_ns = clockevent_delta2ns(3, &clkevt); | ||
241 | |||
242 | clkevt.cpumask = cpumask_of(0); | ||
243 | |||
244 | clockevents_register_device(&clkevt); | ||
245 | |||
246 | setup_irq(SPEAR_GPT0_CHAN0_IRQ, &spear_timer_irq); | ||
247 | } | ||
248 | |||
249 | void __init spear_setup_timer(void) | ||
250 | { | ||
251 | struct clk *pll3_clk; | ||
252 | |||
253 | if (!request_mem_region(SPEAR_GPT0_BASE, SZ_1K, "gpt0")) { | ||
254 | pr_err("%s:cannot get IO addr\n", __func__); | ||
255 | return; | ||
256 | } | ||
257 | |||
258 | gpt_base = (void __iomem *)ioremap(SPEAR_GPT0_BASE, SZ_1K); | ||
259 | if (!gpt_base) { | ||
260 | pr_err("%s:ioremap failed for gpt\n", __func__); | ||
261 | goto err_mem; | ||
262 | } | ||
263 | |||
264 | gpt_clk = clk_get_sys("gpt0", NULL); | ||
265 | if (!gpt_clk) { | ||
266 | pr_err("%s:couldn't get clk for gpt\n", __func__); | ||
267 | goto err_iomap; | ||
268 | } | ||
269 | |||
270 | pll3_clk = clk_get(NULL, "pll3_48m_clk"); | ||
271 | if (!pll3_clk) { | ||
272 | pr_err("%s:couldn't get PLL3 as parent for gpt\n", __func__); | ||
273 | goto err_iomap; | ||
274 | } | ||
275 | |||
276 | clk_set_parent(gpt_clk, pll3_clk); | ||
277 | |||
278 | spear_clockevent_init(); | ||
279 | spear_clocksource_init(); | ||
280 | |||
281 | return; | ||
282 | |||
283 | err_iomap: | ||
284 | iounmap(gpt_base); | ||
285 | |||
286 | err_mem: | ||
287 | release_mem_region(SPEAR_GPT0_BASE, SZ_1K); | ||
288 | } | ||
289 | |||
290 | struct sys_timer spear_sys_timer = { | ||
291 | .init = spear_setup_timer, | ||
292 | }; | ||