diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 12:23:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-22 12:23:24 -0400 |
commit | 9bc747bea5fad819e0c0ad96e6a67ea0640dfe2b (patch) | |
tree | d500225e7a1c90a6bd17d3e63e2f6e781810db2b /arch/arm/mach-orion5x | |
parent | 32b908eea9e5ecd1049008e134eadbfcd0da5e38 (diff) | |
parent | 0e896b1ddc1905df904df98c204bacf028219729 (diff) |
Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull first batch of arm-soc cleanups from Olof Johansson:
"These cleanups are basically all over the place. The idea is to
collect changes with minimal impact but large number of changes so we
can avoid them from distracting in the diffstat in the other series.
A significant number of lines get removed here, in particular because
the ixp2000 and ixp23xx platforms get removed. These have never been
extremely popular and have fallen into disuse over time with no active
maintainer taking care of them. The u5500 soc never made it into a
product, so we are removing it from the ux500 platform.
Many good cleanups also went into the at91 and omap platforms, as has
been the case for a number of releases."
Trivial modify-delete conflicts in arch/arm/mach-{ixp2000,ixp23xx}
* tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (152 commits)
ARM: clps711x: Cleanup IRQ handling
ARM clps711x: Removed unused header mach/time.h
ARM: clps711x: Added note about support EP731x CPU to Kconfig
ARM: clps711x: Added missing register definitions
ARM: clps711x: Used own subarch directory for store header file
Dove: Fix Section mismatch warnings
ARM: orion5x: ts78xx debugging changes
ARM: orion5x: remove PM dependency from ts78xx
ARM: orion5x: ts78xx fix NAND resource off by one
ARM: orion5x: ts78xx whitespace cleanups
Orion5x: Fix Section mismatch warnings
Orion5x: Fix warning: struct pci_dev declared inside paramter list
ARM: clps711x: Combine header files into one for clps711x-targets
ARM: S3C24XX: Use common macro to define resources on mach-qt2410.c
ARM: S3C24XX: Use common macro to define resources on mach-osiris.c
ARM: EXYNOS: Adapt to cpuidle core time keeping and irq enable
ARM: S5PV210: Use common macro to define resources on mach-smdkv210.c
ARM: S5PV210: Use common macro to define resources on dev-audio.c
ARM: S5PC100: Use common macro to define resources on dev-audio.c
ARM: S5P64X0: Use common macro to define resources on dev-audio.c
...
Diffstat (limited to 'arch/arm/mach-orion5x')
-rw-r--r-- | arch/arm/mach-orion5x/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/addr-map.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/common.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/ts78xx-fpga.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-orion5x/ts78xx-setup.c | 52 |
6 files changed, 30 insertions, 34 deletions
diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig index 6604fc6ca58a..0673f0c10432 100644 --- a/arch/arm/mach-orion5x/Kconfig +++ b/arch/arm/mach-orion5x/Kconfig | |||
@@ -86,7 +86,6 @@ config MACH_WRT350N_V2 | |||
86 | 86 | ||
87 | config MACH_TS78XX | 87 | config MACH_TS78XX |
88 | bool "Technologic Systems TS-78xx" | 88 | bool "Technologic Systems TS-78xx" |
89 | select PM | ||
90 | help | 89 | help |
91 | Say 'Y' here if you want your kernel to support the | 90 | Say 'Y' here if you want your kernel to support the |
92 | Technologic Systems TS-78xx platform. | 91 | Technologic Systems TS-78xx platform. |
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c index 3638e5c12b7e..eaac83d1df6f 100644 --- a/arch/arm/mach-orion5x/addr-map.c +++ b/arch/arm/mach-orion5x/addr-map.c | |||
@@ -76,7 +76,7 @@ static int __init cpu_win_can_remap(const struct orion_addr_map_cfg *cfg, | |||
76 | /* | 76 | /* |
77 | * Description of the windows needed by the platform code | 77 | * Description of the windows needed by the platform code |
78 | */ | 78 | */ |
79 | static struct __initdata orion_addr_map_cfg addr_map_cfg = { | 79 | static struct orion_addr_map_cfg addr_map_cfg __initdata = { |
80 | .num_wins = 8, | 80 | .num_wins = 8, |
81 | .cpu_win_can_remap = cpu_win_can_remap, | 81 | .cpu_win_can_remap = cpu_win_can_remap, |
82 | .bridge_virt_base = ORION5X_BRIDGE_VIRT_BASE, | 82 | .bridge_virt_base = ORION5X_BRIDGE_VIRT_BASE, |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 24481666d2cd..e2e9db492d0c 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -205,7 +205,7 @@ int __init orion5x_find_tclk(void) | |||
205 | return 166666667; | 205 | return 166666667; |
206 | } | 206 | } |
207 | 207 | ||
208 | static void orion5x_timer_init(void) | 208 | static void __init orion5x_timer_init(void) |
209 | { | 209 | { |
210 | orion5x_tclk = orion5x_find_tclk(); | 210 | orion5x_tclk = orion5x_find_tclk(); |
211 | 211 | ||
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index 2e6454c8d4ba..31bab92ce038 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -45,6 +45,7 @@ void orion5x_restart(char, const char *); | |||
45 | */ | 45 | */ |
46 | struct pci_bus; | 46 | struct pci_bus; |
47 | struct pci_sys_data; | 47 | struct pci_sys_data; |
48 | struct pci_dev; | ||
48 | 49 | ||
49 | void orion5x_pcie_id(u32 *dev, u32 *rev); | 50 | void orion5x_pcie_id(u32 *dev, u32 *rev); |
50 | void orion5x_pci_disable(void); | 51 | void orion5x_pci_disable(void); |
diff --git a/arch/arm/mach-orion5x/ts78xx-fpga.h b/arch/arm/mach-orion5x/ts78xx-fpga.h index 151e89e1e676..97c393d39ae2 100644 --- a/arch/arm/mach-orion5x/ts78xx-fpga.h +++ b/arch/arm/mach-orion5x/ts78xx-fpga.h | |||
@@ -28,9 +28,9 @@ struct fpga_device { | |||
28 | 28 | ||
29 | struct fpga_devices { | 29 | struct fpga_devices { |
30 | /* Technologic Systems */ | 30 | /* Technologic Systems */ |
31 | struct fpga_device ts_rtc; | 31 | struct fpga_device ts_rtc; |
32 | struct fpga_device ts_nand; | 32 | struct fpga_device ts_nand; |
33 | struct fpga_device ts_rng; | 33 | struct fpga_device ts_rng; |
34 | }; | 34 | }; |
35 | 35 | ||
36 | struct ts78xx_fpga_data { | 36 | struct ts78xx_fpga_data { |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index c96f37472eda..a74f3cf54cc5 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
@@ -8,6 +8,8 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
12 | |||
11 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 14 | #include <linux/init.h> |
13 | #include <linux/sysfs.h> | 15 | #include <linux/sysfs.h> |
@@ -115,7 +117,7 @@ static struct platform_device ts78xx_ts_rtc_device = { | |||
115 | * I've used the method TS use in their rtc7800.c example for the detection | 117 | * I've used the method TS use in their rtc7800.c example for the detection |
116 | * | 118 | * |
117 | * TODO: track down a guinea pig without an RTC to see if we can work out a | 119 | * TODO: track down a guinea pig without an RTC to see if we can work out a |
118 | * better RTC detection routine | 120 | * better RTC detection routine |
119 | */ | 121 | */ |
120 | static int ts78xx_ts_rtc_load(void) | 122 | static int ts78xx_ts_rtc_load(void) |
121 | { | 123 | { |
@@ -141,10 +143,14 @@ static int ts78xx_ts_rtc_load(void) | |||
141 | } else | 143 | } else |
142 | rc = platform_device_add(&ts78xx_ts_rtc_device); | 144 | rc = platform_device_add(&ts78xx_ts_rtc_device); |
143 | 145 | ||
146 | if (rc) | ||
147 | pr_info("RTC could not be registered: %d\n", | ||
148 | rc); | ||
144 | return rc; | 149 | return rc; |
145 | } | 150 | } |
146 | } | 151 | } |
147 | 152 | ||
153 | pr_info("RTC not found\n"); | ||
148 | return -ENODEV; | 154 | return -ENODEV; |
149 | }; | 155 | }; |
150 | 156 | ||
@@ -292,11 +298,8 @@ static struct platform_nand_data ts78xx_ts_nand_data = { | |||
292 | }, | 298 | }, |
293 | }; | 299 | }; |
294 | 300 | ||
295 | static struct resource ts78xx_ts_nand_resources = { | 301 | static struct resource ts78xx_ts_nand_resources |
296 | .start = TS_NAND_DATA, | 302 | = DEFINE_RES_MEM(TS_NAND_DATA, 4); |
297 | .end = TS_NAND_DATA + 4, | ||
298 | .flags = IORESOURCE_MEM, | ||
299 | }; | ||
300 | 303 | ||
301 | static struct platform_device ts78xx_ts_nand_device = { | 304 | static struct platform_device ts78xx_ts_nand_device = { |
302 | .name = "gen_nand", | 305 | .name = "gen_nand", |
@@ -319,6 +322,8 @@ static int ts78xx_ts_nand_load(void) | |||
319 | } else | 322 | } else |
320 | rc = platform_device_add(&ts78xx_ts_nand_device); | 323 | rc = platform_device_add(&ts78xx_ts_nand_device); |
321 | 324 | ||
325 | if (rc) | ||
326 | pr_info("NAND could not be registered: %d\n", rc); | ||
322 | return rc; | 327 | return rc; |
323 | }; | 328 | }; |
324 | 329 | ||
@@ -332,11 +337,8 @@ static void ts78xx_ts_nand_unload(void) | |||
332 | ****************************************************************************/ | 337 | ****************************************************************************/ |
333 | #define TS_RNG_DATA (TS78XX_FPGA_REGS_PHYS_BASE | 0x044) | 338 | #define TS_RNG_DATA (TS78XX_FPGA_REGS_PHYS_BASE | 0x044) |
334 | 339 | ||
335 | static struct resource ts78xx_ts_rng_resource = { | 340 | static struct resource ts78xx_ts_rng_resource |
336 | .flags = IORESOURCE_MEM, | 341 | = DEFINE_RES_MEM(TS_RNG_DATA, 4); |
337 | .start = TS_RNG_DATA, | ||
338 | .end = TS_RNG_DATA + 4 - 1, | ||
339 | }; | ||
340 | 342 | ||
341 | static struct timeriomem_rng_data ts78xx_ts_rng_data = { | 343 | static struct timeriomem_rng_data ts78xx_ts_rng_data = { |
342 | .period = 1000000, /* one second */ | 344 | .period = 1000000, /* one second */ |
@@ -363,6 +365,8 @@ static int ts78xx_ts_rng_load(void) | |||
363 | } else | 365 | } else |
364 | rc = platform_device_add(&ts78xx_ts_rng_device); | 366 | rc = platform_device_add(&ts78xx_ts_rng_device); |
365 | 367 | ||
368 | if (rc) | ||
369 | pr_info("RNG could not be registered: %d\n", rc); | ||
366 | return rc; | 370 | return rc; |
367 | }; | 371 | }; |
368 | 372 | ||
@@ -402,7 +406,7 @@ static void ts78xx_fpga_supports(void) | |||
402 | /* enable devices if magic matches */ | 406 | /* enable devices if magic matches */ |
403 | switch ((ts78xx_fpga.id >> 8) & 0xffffff) { | 407 | switch ((ts78xx_fpga.id >> 8) & 0xffffff) { |
404 | case TS7800_FPGA_MAGIC: | 408 | case TS7800_FPGA_MAGIC: |
405 | pr_warning("TS-7800 FPGA: unrecognized revision 0x%.2x\n", | 409 | pr_warning("unrecognised FPGA revision 0x%.2x\n", |
406 | ts78xx_fpga.id & 0xff); | 410 | ts78xx_fpga.id & 0xff); |
407 | ts78xx_fpga.supports.ts_rtc.present = 1; | 411 | ts78xx_fpga.supports.ts_rtc.present = 1; |
408 | ts78xx_fpga.supports.ts_nand.present = 1; | 412 | ts78xx_fpga.supports.ts_nand.present = 1; |
@@ -422,26 +426,20 @@ static int ts78xx_fpga_load_devices(void) | |||
422 | 426 | ||
423 | if (ts78xx_fpga.supports.ts_rtc.present == 1) { | 427 | if (ts78xx_fpga.supports.ts_rtc.present == 1) { |
424 | tmp = ts78xx_ts_rtc_load(); | 428 | tmp = ts78xx_ts_rtc_load(); |
425 | if (tmp) { | 429 | if (tmp) |
426 | pr_info("TS-78xx: RTC not registered\n"); | ||
427 | ts78xx_fpga.supports.ts_rtc.present = 0; | 430 | ts78xx_fpga.supports.ts_rtc.present = 0; |
428 | } | ||
429 | ret |= tmp; | 431 | ret |= tmp; |
430 | } | 432 | } |
431 | if (ts78xx_fpga.supports.ts_nand.present == 1) { | 433 | if (ts78xx_fpga.supports.ts_nand.present == 1) { |
432 | tmp = ts78xx_ts_nand_load(); | 434 | tmp = ts78xx_ts_nand_load(); |
433 | if (tmp) { | 435 | if (tmp) |
434 | pr_info("TS-78xx: NAND not registered\n"); | ||
435 | ts78xx_fpga.supports.ts_nand.present = 0; | 436 | ts78xx_fpga.supports.ts_nand.present = 0; |
436 | } | ||
437 | ret |= tmp; | 437 | ret |= tmp; |
438 | } | 438 | } |
439 | if (ts78xx_fpga.supports.ts_rng.present == 1) { | 439 | if (ts78xx_fpga.supports.ts_rng.present == 1) { |
440 | tmp = ts78xx_ts_rng_load(); | 440 | tmp = ts78xx_ts_rng_load(); |
441 | if (tmp) { | 441 | if (tmp) |
442 | pr_info("TS-78xx: RNG not registered\n"); | ||
443 | ts78xx_fpga.supports.ts_rng.present = 0; | 442 | ts78xx_fpga.supports.ts_rng.present = 0; |
444 | } | ||
445 | ret |= tmp; | 443 | ret |= tmp; |
446 | } | 444 | } |
447 | 445 | ||
@@ -466,7 +464,7 @@ static int ts78xx_fpga_load(void) | |||
466 | { | 464 | { |
467 | ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE); | 465 | ts78xx_fpga.id = readl(TS78XX_FPGA_REGS_VIRT_BASE); |
468 | 466 | ||
469 | pr_info("TS-78xx FPGA: magic=0x%.6x, rev=0x%.2x\n", | 467 | pr_info("FPGA magic=0x%.6x, rev=0x%.2x\n", |
470 | (ts78xx_fpga.id >> 8) & 0xffffff, | 468 | (ts78xx_fpga.id >> 8) & 0xffffff, |
471 | ts78xx_fpga.id & 0xff); | 469 | ts78xx_fpga.id & 0xff); |
472 | 470 | ||
@@ -494,7 +492,7 @@ static int ts78xx_fpga_unload(void) | |||
494 | * UrJTAG SVN since r1381 can be used to reprogram the FPGA | 492 | * UrJTAG SVN since r1381 can be used to reprogram the FPGA |
495 | */ | 493 | */ |
496 | if (ts78xx_fpga.id != fpga_id) { | 494 | if (ts78xx_fpga.id != fpga_id) { |
497 | pr_err("TS-78xx FPGA: magic/rev mismatch\n" | 495 | pr_err("FPGA magic/rev mismatch\n" |
498 | "TS-78xx FPGA: was 0x%.6x/%.2x but now 0x%.6x/%.2x\n", | 496 | "TS-78xx FPGA: was 0x%.6x/%.2x but now 0x%.6x/%.2x\n", |
499 | (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff, | 497 | (ts78xx_fpga.id >> 8) & 0xffffff, ts78xx_fpga.id & 0xff, |
500 | (fpga_id >> 8) & 0xffffff, fpga_id & 0xff); | 498 | (fpga_id >> 8) & 0xffffff, fpga_id & 0xff); |
@@ -525,7 +523,7 @@ static ssize_t ts78xx_fpga_store(struct kobject *kobj, | |||
525 | int value, ret; | 523 | int value, ret; |
526 | 524 | ||
527 | if (ts78xx_fpga.state < 0) { | 525 | if (ts78xx_fpga.state < 0) { |
528 | pr_err("TS-78xx FPGA: borked, you must powercycle asap\n"); | 526 | pr_err("FPGA borked, you must powercycle ASAP\n"); |
529 | return -EBUSY; | 527 | return -EBUSY; |
530 | } | 528 | } |
531 | 529 | ||
@@ -533,10 +531,8 @@ static ssize_t ts78xx_fpga_store(struct kobject *kobj, | |||
533 | value = 1; | 531 | value = 1; |
534 | else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0) | 532 | else if (strncmp(buf, "offline", sizeof("offline") - 1) == 0) |
535 | value = 0; | 533 | value = 0; |
536 | else { | 534 | else |
537 | pr_err("ts78xx_fpga_store: Invalid value\n"); | ||
538 | return -EINVAL; | 535 | return -EINVAL; |
539 | } | ||
540 | 536 | ||
541 | if (ts78xx_fpga.state == value) | 537 | if (ts78xx_fpga.state == value) |
542 | return n; | 538 | return n; |
@@ -614,7 +610,7 @@ static void __init ts78xx_init(void) | |||
614 | /* FPGA init */ | 610 | /* FPGA init */ |
615 | ts78xx_fpga_devices_zero_init(); | 611 | ts78xx_fpga_devices_zero_init(); |
616 | ret = ts78xx_fpga_load(); | 612 | ret = ts78xx_fpga_load(); |
617 | ret = sysfs_create_file(power_kobj, &ts78xx_fpga_attr.attr); | 613 | ret = sysfs_create_file(firmware_kobj, &ts78xx_fpga_attr.attr); |
618 | if (ret) | 614 | if (ret) |
619 | pr_err("sysfs_create_file failed: %d\n", ret); | 615 | pr_err("sysfs_create_file failed: %d\n", ret); |
620 | } | 616 | } |