Commit 94bf2758 authored by Russell King's avatar Russell King
parents d93c333d f539dfed
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
#define IO_SPACE_LIMIT 0xffffffff #define IO_SPACE_LIMIT 0xffffffff
#define __io(a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_PHYS_BASE) +\ #define __io(a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_BUS_BASE) + \
DOVE_PCIE0_IO_VIRT_BASE)) DOVE_PCIE0_IO_VIRT_BASE))
#define __mem_pci(a) (a) #define __mem_pci(a) (a)
#endif #endif
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#define KIRKWOOD_PCIE1_IO_PHYS_BASE 0xf3000000 #define KIRKWOOD_PCIE1_IO_PHYS_BASE 0xf3000000
#define KIRKWOOD_PCIE1_IO_VIRT_BASE 0xfef00000 #define KIRKWOOD_PCIE1_IO_VIRT_BASE 0xfef00000
#define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00000000 #define KIRKWOOD_PCIE1_IO_BUS_BASE 0x00100000
#define KIRKWOOD_PCIE1_IO_SIZE SZ_1M #define KIRKWOOD_PCIE1_IO_SIZE SZ_1M
#define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000 #define KIRKWOOD_PCIE_IO_PHYS_BASE 0xf2000000
......
...@@ -117,7 +117,7 @@ static void __init pcie0_ioresources_init(struct pcie_port *pp) ...@@ -117,7 +117,7 @@ static void __init pcie0_ioresources_init(struct pcie_port *pp)
* IORESOURCE_IO * IORESOURCE_IO
*/ */
pp->res[0].name = "PCIe 0 I/O Space"; pp->res[0].name = "PCIe 0 I/O Space";
pp->res[0].start = KIRKWOOD_PCIE_IO_PHYS_BASE; pp->res[0].start = KIRKWOOD_PCIE_IO_BUS_BASE;
pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1; pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE_IO_SIZE - 1;
pp->res[0].flags = IORESOURCE_IO; pp->res[0].flags = IORESOURCE_IO;
...@@ -139,7 +139,7 @@ static void __init pcie1_ioresources_init(struct pcie_port *pp) ...@@ -139,7 +139,7 @@ static void __init pcie1_ioresources_init(struct pcie_port *pp)
* IORESOURCE_IO * IORESOURCE_IO
*/ */
pp->res[0].name = "PCIe 1 I/O Space"; pp->res[0].name = "PCIe 1 I/O Space";
pp->res[0].start = KIRKWOOD_PCIE1_IO_PHYS_BASE; pp->res[0].start = KIRKWOOD_PCIE1_IO_BUS_BASE;
pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE1_IO_SIZE - 1; pp->res[0].end = pp->res[0].start + KIRKWOOD_PCIE1_IO_SIZE - 1;
pp->res[0].flags = IORESOURCE_IO; pp->res[0].flags = IORESOURCE_IO;
......
...@@ -162,7 +162,7 @@ static int mv_is_err_intr(u32 intr_cause) ...@@ -162,7 +162,7 @@ static int mv_is_err_intr(u32 intr_cause)
static void mv_xor_device_clear_eoc_cause(struct mv_xor_chan *chan) static void mv_xor_device_clear_eoc_cause(struct mv_xor_chan *chan)
{ {
u32 val = (1 << (1 + (chan->idx * 16))); u32 val = ~(1 << (chan->idx * 16));
dev_dbg(chan->device->common.dev, "%s, val 0x%08x\n", __func__, val); dev_dbg(chan->device->common.dev, "%s, val 0x%08x\n", __func__, val);
__raw_writel(val, XOR_INTR_CAUSE(chan)); __raw_writel(val, XOR_INTR_CAUSE(chan));
} }
......
...@@ -81,7 +81,7 @@ static int ns2_led_get_mode(struct ns2_led_data *led_dat, ...@@ -81,7 +81,7 @@ static int ns2_led_get_mode(struct ns2_led_data *led_dat,
int cmd_level; int cmd_level;
int slow_level; int slow_level;
read_lock(&led_dat->rw_lock); read_lock_irq(&led_dat->rw_lock);
cmd_level = gpio_get_value(led_dat->cmd); cmd_level = gpio_get_value(led_dat->cmd);
slow_level = gpio_get_value(led_dat->slow); slow_level = gpio_get_value(led_dat->slow);
...@@ -95,7 +95,7 @@ static int ns2_led_get_mode(struct ns2_led_data *led_dat, ...@@ -95,7 +95,7 @@ static int ns2_led_get_mode(struct ns2_led_data *led_dat,
} }
} }
read_unlock(&led_dat->rw_lock); read_unlock_irq(&led_dat->rw_lock);
return ret; return ret;
} }
...@@ -104,8 +104,9 @@ static void ns2_led_set_mode(struct ns2_led_data *led_dat, ...@@ -104,8 +104,9 @@ static void ns2_led_set_mode(struct ns2_led_data *led_dat,
enum ns2_led_modes mode) enum ns2_led_modes mode)
{ {
int i; int i;
unsigned long flags;
write_lock(&led_dat->rw_lock); write_lock_irqsave(&led_dat->rw_lock, flags);
for (i = 0; i < ARRAY_SIZE(ns2_led_modval); i++) { for (i = 0; i < ARRAY_SIZE(ns2_led_modval); i++) {
if (mode == ns2_led_modval[i].mode) { if (mode == ns2_led_modval[i].mode) {
...@@ -116,7 +117,7 @@ static void ns2_led_set_mode(struct ns2_led_data *led_dat, ...@@ -116,7 +117,7 @@ static void ns2_led_set_mode(struct ns2_led_data *led_dat,
} }
} }
write_unlock(&led_dat->rw_lock); write_unlock_irqrestore(&led_dat->rw_lock, flags);
} }
static void ns2_led_set(struct led_classdev *led_cdev, static void ns2_led_set(struct led_classdev *led_cdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment