diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macintosh/therm_adt746x.c | 4 | ||||
-rw-r--r-- | drivers/net/fec_mpc52xx.c | 6 | ||||
-rw-r--r-- | drivers/serial/mpc52xx_uart.c | 40 | ||||
-rw-r--r-- | drivers/watchdog/Kconfig | 2 |
4 files changed, 17 insertions, 35 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 82607add69a9..c0621d50c8a0 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
@@ -498,8 +498,8 @@ static ssize_t store_##name(struct device *dev, struct device_attribute *attr, c | |||
498 | #define BUILD_STORE_FUNC_INT(name, data) \ | 498 | #define BUILD_STORE_FUNC_INT(name, data) \ |
499 | static ssize_t store_##name(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) \ | 499 | static ssize_t store_##name(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) \ |
500 | { \ | 500 | { \ |
501 | u32 val; \ | 501 | int val; \ |
502 | val = simple_strtoul(buf, NULL, 10); \ | 502 | val = simple_strtol(buf, NULL, 10); \ |
503 | if (val < 0 || val > 255) \ | 503 | if (val < 0 || val > 255) \ |
504 | return -EINVAL; \ | 504 | return -EINVAL; \ |
505 | printk(KERN_INFO "Setting specified fan speed to %d\n", val); \ | 505 | printk(KERN_INFO "Setting specified fan speed to %d\n", val); \ |
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index cd8e98b45ec5..049b0a7e01f3 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -1123,9 +1123,9 @@ static int mpc52xx_fec_of_resume(struct of_device *op) | |||
1123 | #endif | 1123 | #endif |
1124 | 1124 | ||
1125 | static struct of_device_id mpc52xx_fec_match[] = { | 1125 | static struct of_device_id mpc52xx_fec_match[] = { |
1126 | { .type = "network", .compatible = "fsl,mpc5200b-fec", }, | 1126 | { .compatible = "fsl,mpc5200b-fec", }, |
1127 | { .type = "network", .compatible = "fsl,mpc5200-fec", }, | 1127 | { .compatible = "fsl,mpc5200-fec", }, |
1128 | { .type = "network", .compatible = "mpc5200-fec", }, | 1128 | { .compatible = "mpc5200-fec", }, |
1129 | { } | 1129 | { } |
1130 | }; | 1130 | }; |
1131 | 1131 | ||
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 0c3a2ab1612c..7f72f8ceaa6f 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -50,8 +50,8 @@ | |||
50 | /* OF Platform device Usage : | 50 | /* OF Platform device Usage : |
51 | * | 51 | * |
52 | * This driver is only used for PSCs configured in uart mode. The device | 52 | * This driver is only used for PSCs configured in uart mode. The device |
53 | * tree will have a node for each PSC in uart mode w/ device_type = "serial" | 53 | * tree will have a node for each PSC with "mpc52xx-psc-uart" in the compatible |
54 | * and "mpc52xx-psc-uart" in the compatible string | 54 | * list. |
55 | * | 55 | * |
56 | * By default, PSC devices are enumerated in the order they are found. However | 56 | * By default, PSC devices are enumerated in the order they are found. However |
57 | * a particular PSC number can be forces by adding 'device_no = <port#>' | 57 | * a particular PSC number can be forces by adding 'device_no = <port#>' |
@@ -522,7 +522,7 @@ mpc52xx_uart_startup(struct uart_port *port) | |||
522 | 522 | ||
523 | /* Request IRQ */ | 523 | /* Request IRQ */ |
524 | ret = request_irq(port->irq, mpc52xx_uart_int, | 524 | ret = request_irq(port->irq, mpc52xx_uart_int, |
525 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM | IRQF_SHARED, | 525 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, |
526 | "mpc52xx_psc_uart", port); | 526 | "mpc52xx_psc_uart", port); |
527 | if (ret) | 527 | if (ret) |
528 | return ret; | 528 | return ret; |
@@ -1212,30 +1212,18 @@ mpc52xx_uart_of_resume(struct of_device *op) | |||
1212 | #endif | 1212 | #endif |
1213 | 1213 | ||
1214 | static void | 1214 | static void |
1215 | mpc52xx_uart_of_assign(struct device_node *np, int idx) | 1215 | mpc52xx_uart_of_assign(struct device_node *np) |
1216 | { | 1216 | { |
1217 | int free_idx = -1; | ||
1218 | int i; | 1217 | int i; |
1219 | 1218 | ||
1220 | /* Find the first free node */ | 1219 | /* Find the first free PSC number */ |
1221 | for (i = 0; i < MPC52xx_PSC_MAXNUM; i++) { | 1220 | for (i = 0; i < MPC52xx_PSC_MAXNUM; i++) { |
1222 | if (mpc52xx_uart_nodes[i] == NULL) { | 1221 | if (mpc52xx_uart_nodes[i] == NULL) { |
1223 | free_idx = i; | 1222 | of_node_get(np); |
1224 | break; | 1223 | mpc52xx_uart_nodes[i] = np; |
1224 | return; | ||
1225 | } | 1225 | } |
1226 | } | 1226 | } |
1227 | |||
1228 | if ((idx < 0) || (idx >= MPC52xx_PSC_MAXNUM)) | ||
1229 | idx = free_idx; | ||
1230 | |||
1231 | if (idx < 0) | ||
1232 | return; /* No free slot; abort */ | ||
1233 | |||
1234 | of_node_get(np); | ||
1235 | /* If the slot is already occupied, then swap slots */ | ||
1236 | if (mpc52xx_uart_nodes[idx] && (free_idx != -1)) | ||
1237 | mpc52xx_uart_nodes[free_idx] = mpc52xx_uart_nodes[idx]; | ||
1238 | mpc52xx_uart_nodes[idx] = np; | ||
1239 | } | 1227 | } |
1240 | 1228 | ||
1241 | static void | 1229 | static void |
@@ -1243,23 +1231,17 @@ mpc52xx_uart_of_enumerate(void) | |||
1243 | { | 1231 | { |
1244 | static int enum_done; | 1232 | static int enum_done; |
1245 | struct device_node *np; | 1233 | struct device_node *np; |
1246 | const unsigned int *devno; | ||
1247 | const struct of_device_id *match; | 1234 | const struct of_device_id *match; |
1248 | int i; | 1235 | int i; |
1249 | 1236 | ||
1250 | if (enum_done) | 1237 | if (enum_done) |
1251 | return; | 1238 | return; |
1252 | 1239 | ||
1253 | for_each_node_by_type(np, "serial") { | 1240 | /* Assign index to each PSC in device tree */ |
1241 | for_each_matching_node(np, mpc52xx_uart_of_match) { | ||
1254 | match = of_match_node(mpc52xx_uart_of_match, np); | 1242 | match = of_match_node(mpc52xx_uart_of_match, np); |
1255 | if (!match) | ||
1256 | continue; | ||
1257 | |||
1258 | psc_ops = match->data; | 1243 | psc_ops = match->data; |
1259 | 1244 | mpc52xx_uart_of_assign(np); | |
1260 | /* Is a particular device number requested? */ | ||
1261 | devno = of_get_property(np, "port-number", NULL); | ||
1262 | mpc52xx_uart_of_assign(np, devno ? *devno : -1); | ||
1263 | } | 1245 | } |
1264 | 1246 | ||
1265 | enum_done = 1; | 1247 | enum_done = 1; |
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig index 325c10ff6a2c..c7352f7195ee 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig | |||
@@ -772,7 +772,7 @@ config TXX9_WDT | |||
772 | 772 | ||
773 | config GEF_WDT | 773 | config GEF_WDT |
774 | tristate "GE Fanuc Watchdog Timer" | 774 | tristate "GE Fanuc Watchdog Timer" |
775 | depends on GEF_SBC610 | 775 | depends on GEF_SBC610 || GEF_SBC310 |
776 | ---help--- | 776 | ---help--- |
777 | Watchdog timer found in a number of GE Fanuc single board computers. | 777 | Watchdog timer found in a number of GE Fanuc single board computers. |
778 | 778 | ||