Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ARM] 4406/1: Trivial NSLU2 / NAS-100D header & setup code cleanup

This trivial patch updates the nslu2 and nas-100d headers to
remove pointless GPIO defines, and updates nslu2-setup.c
accordingly. In addition minor style cleanups to some comments
are included.

Signed-off-by: Michael-Luke Jones <mlj28@cam.ac.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Michael-Luke Jones and committed by
Russell King
cc50a0df 435c5da0

+28 -68
+2 -1
arch/arm/mach-ixp4xx/nas100d-setup.c
··· 155 155 156 156 pm_power_off = nas100d_power_off; 157 157 158 - /* This is only useful on a modified machine, but it is valuable 158 + /* 159 + * This is only useful on a modified machine, but it is valuable 159 160 * to have it first in order to see debug messages, and so that 160 161 * it does *not* get removed if platform_add_devices fails! 161 162 */
+10 -9
arch/arm/mach-ixp4xx/nslu2-setup.c
··· 50 50 static struct resource nslu2_led_resources[] = { 51 51 { 52 52 .name = "ready", /* green led */ 53 - .start = NSLU2_LED_GRN, 54 - .end = NSLU2_LED_GRN, 53 + .start = NSLU2_LED_GRN_GPIO, 54 + .end = NSLU2_LED_GRN_GPIO, 55 55 .flags = IXP4XX_GPIO_HIGH, 56 56 }, 57 57 { 58 58 .name = "status", /* red led */ 59 - .start = NSLU2_LED_RED, 60 - .end = NSLU2_LED_RED, 59 + .start = NSLU2_LED_RED_GPIO, 60 + .end = NSLU2_LED_RED_GPIO, 61 61 .flags = IXP4XX_GPIO_HIGH, 62 62 }, 63 63 { 64 64 .name = "disk-1", 65 - .start = NSLU2_LED_DISK1, 66 - .end = NSLU2_LED_DISK1, 65 + .start = NSLU2_LED_DISK1_GPIO, 66 + .end = NSLU2_LED_DISK1_GPIO, 67 67 .flags = IXP4XX_GPIO_LOW, 68 68 }, 69 69 { 70 70 .name = "disk-2", 71 - .start = NSLU2_LED_DISK2, 72 - .end = NSLU2_LED_DISK2, 71 + .start = NSLU2_LED_DISK2_GPIO, 72 + .end = NSLU2_LED_DISK2_GPIO, 73 73 .flags = IXP4XX_GPIO_LOW, 74 74 }, 75 75 }; ··· 181 181 182 182 pm_power_off = nslu2_power_off; 183 183 184 - /* This is only useful on a modified machine, but it is valuable 184 + /* 185 + * This is only useful on a modified machine, but it is valuable 185 186 * to have it first in order to see debug messages, and so that 186 187 * it does *not* get removed if platform_add_devices fails! 187 188 */
+4 -24
include/asm-arm/arch-ixp4xx/nas100d.h
··· 10 10 * based on ixdp425.h: 11 11 * Copyright 2004 (c) MontaVista, Software, Inc. 12 12 * 13 - * This file is licensed under the terms of the GNU General Public 13 + * This file is licensed under the terms of the GNU General Public 14 14 * License version 2. This program is licensed "as is" without any 15 15 * warranty of any kind, whether express or implied. 16 16 */ ··· 36 36 #define NAS100D_PCI_INTD_PIN 8 37 37 #define NAS100D_PCI_INTE_PIN 7 38 38 39 - /* GPIO */ 40 - 41 - #define NAS100D_GPIO0 0 42 - #define NAS100D_GPIO1 1 43 - #define NAS100D_GPIO2 2 44 - #define NAS100D_GPIO3 3 45 - #define NAS100D_GPIO4 4 46 - #define NAS100D_GPIO5 5 47 - #define NAS100D_GPIO6 6 48 - #define NAS100D_GPIO7 7 49 - #define NAS100D_GPIO8 8 50 - #define NAS100D_GPIO9 9 51 - #define NAS100D_GPIO10 10 52 - #define NAS100D_GPIO11 11 53 - #define NAS100D_GPIO12 12 54 - #define NAS100D_GPIO13 13 55 - #define NAS100D_GPIO14 14 56 - #define NAS100D_GPIO15 15 57 - 58 - 59 39 /* Buttons */ 60 40 61 - #define NAS100D_PB_GPIO NAS100D_GPIO14 62 - #define NAS100D_RB_GPIO NAS100D_GPIO4 63 - #define NAS100D_PO_GPIO NAS100D_GPIO12 /* power off */ 41 + #define NAS100D_PB_GPIO 14 42 + #define NAS100D_RB_GPIO 4 43 + #define NAS100D_PO_GPIO 12 /* power off */ 64 44 65 45 #define NAS100D_PB_IRQ IRQ_IXP4XX_GPIO14 66 46 #define NAS100D_RB_IRQ IRQ_IXP4XX_GPIO4
+12 -34
include/asm-arm/arch-ixp4xx/nslu2.h
··· 9 9 * based on ixdp425.h: 10 10 * Copyright 2004 (c) MontaVista, Software, Inc. 11 11 * 12 - * This file is licensed under the terms of the GNU General Public 12 + * This file is licensed under the terms of the GNU General Public 13 13 * License version 2. This program is licensed "as is" without any 14 14 * warranty of any kind, whether express or implied. 15 15 */ ··· 34 34 #define NSLU2_PCI_INTC_PIN 9 35 35 #define NSLU2_PCI_INTD_PIN 8 36 36 37 - 38 37 /* NSLU2 Timer */ 39 38 #define NSLU2_FREQ 66000000 40 - #define NSLU2_CLOCK_TICK_RATE (((NSLU2_FREQ / HZ & ~IXP4XX_OST_RELOAD_MASK) + 1) * HZ) 41 - #define NSLU2_CLOCK_TICKS_PER_USEC ((NSLU2_CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC) 42 - 43 - /* GPIO */ 44 - 45 - #define NSLU2_GPIO0 0 46 - #define NSLU2_GPIO1 1 47 - #define NSLU2_GPIO2 2 48 - #define NSLU2_GPIO3 3 49 - #define NSLU2_GPIO4 4 50 - #define NSLU2_GPIO5 5 51 - #define NSLU2_GPIO6 6 52 - #define NSLU2_GPIO7 7 53 - #define NSLU2_GPIO8 8 54 - #define NSLU2_GPIO9 9 55 - #define NSLU2_GPIO10 10 56 - #define NSLU2_GPIO11 11 57 - #define NSLU2_GPIO12 12 58 - #define NSLU2_GPIO13 13 59 - #define NSLU2_GPIO14 14 60 - #define NSLU2_GPIO15 15 61 39 62 40 /* Buttons */ 63 41 64 - #define NSLU2_PB_GPIO NSLU2_GPIO5 65 - #define NSLU2_PO_GPIO NSLU2_GPIO8 /* power off */ 66 - #define NSLU2_RB_GPIO NSLU2_GPIO12 42 + #define NSLU2_PB_GPIO 5 43 + #define NSLU2_PO_GPIO 8 /* power off */ 44 + #define NSLU2_RB_GPIO 12 67 45 68 46 #define NSLU2_PB_IRQ IRQ_IXP4XX_GPIO5 69 47 #define NSLU2_RB_IRQ IRQ_IXP4XX_GPIO12 ··· 57 79 58 80 /* LEDs */ 59 81 60 - #define NSLU2_LED_RED NSLU2_GPIO0 61 - #define NSLU2_LED_GRN NSLU2_GPIO1 82 + #define NSLU2_LED_RED_GPIO 0 83 + #define NSLU2_LED_GRN_GPIO 1 62 84 63 - #define NSLU2_LED_RED_BM (1L << NSLU2_LED_RED) 64 - #define NSLU2_LED_GRN_BM (1L << NSLU2_LED_GRN) 85 + #define NSLU2_LED_RED_BM (1L << NSLU2_LED_RED_GPIO) 86 + #define NSLU2_LED_GRN_BM (1L << NSLU2_LED_GRN_GPIO) 65 87 66 - #define NSLU2_LED_DISK1 NSLU2_GPIO3 67 - #define NSLU2_LED_DISK2 NSLU2_GPIO2 88 + #define NSLU2_LED_DISK1_GPIO 3 89 + #define NSLU2_LED_DISK2_GPIO 2 68 90 69 - #define NSLU2_LED_DISK1_BM (1L << NSLU2_GPIO2) 70 - #define NSLU2_LED_DISK2_BM (1L << NSLU2_GPIO3) 91 + #define NSLU2_LED_DISK1_BM (1L << NSLU2_LED_DISK1_GPIO) 92 + #define NSLU2_LED_DISK2_BM (1L << NSLU2_LED_DISK2_GPIO) 71 93 72 94