aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/drivers')
-rw-r--r--arch/sh/drivers/dma/dma-sh.c2
-rw-r--r--arch/sh/drivers/heartbeat.c2
-rw-r--r--arch/sh/drivers/pci/ops-dreamcast.c44
3 files changed, 24 insertions, 24 deletions
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c
index 5c3359756a92..71ff3d6f26e2 100644
--- a/arch/sh/drivers/dma/dma-sh.c
+++ b/arch/sh/drivers/dma/dma-sh.c
@@ -90,7 +90,7 @@ static irqreturn_t dma_tei(int irq, void *dev_id)
90 90
91static int sh_dmac_request_dma(struct dma_channel *chan) 91static int sh_dmac_request_dma(struct dma_channel *chan)
92{ 92{
93 if (unlikely(!chan->flags & DMA_TEI_CAPABLE)) 93 if (unlikely(!(chan->flags & DMA_TEI_CAPABLE)))
94 return 0; 94 return 0;
95 95
96 return request_irq(get_dmte_irq(chan->chan), dma_tei, 96 return request_irq(get_dmte_irq(chan->chan), dma_tei,
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c
index b76a14f12ce2..ab77b0e0fa0e 100644
--- a/arch/sh/drivers/heartbeat.c
+++ b/arch/sh/drivers/heartbeat.c
@@ -93,7 +93,7 @@ static int heartbeat_drv_probe(struct platform_device *pdev)
93 } 93 }
94 94
95 hd->base = ioremap_nocache(res->start, res->end - res->start + 1); 95 hd->base = ioremap_nocache(res->start, res->end - res->start + 1);
96 if (!unlikely(hd->base)) { 96 if (unlikely(!hd->base)) {
97 dev_err(&pdev->dev, "ioremap failed\n"); 97 dev_err(&pdev->dev, "ioremap failed\n");
98 98
99 if (!pdev->dev.platform_data) 99 if (!pdev->dev.platform_data)
diff --git a/arch/sh/drivers/pci/ops-dreamcast.c b/arch/sh/drivers/pci/ops-dreamcast.c
index 0dac87b19624..e1284fc69361 100644
--- a/arch/sh/drivers/pci/ops-dreamcast.c
+++ b/arch/sh/drivers/pci/ops-dreamcast.c
@@ -83,9 +83,9 @@ static int gapspci_read(struct pci_bus *bus, unsigned int devfn, int where, int
83 return PCIBIOS_DEVICE_NOT_FOUND; 83 return PCIBIOS_DEVICE_NOT_FOUND;
84 84
85 switch (size) { 85 switch (size) {
86 case 1: *val = ctrl_inb(GAPSPCI_BBA_CONFIG+where); break; 86 case 1: *val = inb(GAPSPCI_BBA_CONFIG+where); break;
87 case 2: *val = ctrl_inw(GAPSPCI_BBA_CONFIG+where); break; 87 case 2: *val = inw(GAPSPCI_BBA_CONFIG+where); break;
88 case 4: *val = ctrl_inl(GAPSPCI_BBA_CONFIG+where); break; 88 case 4: *val = inl(GAPSPCI_BBA_CONFIG+where); break;
89 } 89 }
90 90
91 return PCIBIOS_SUCCESSFUL; 91 return PCIBIOS_SUCCESSFUL;
@@ -97,9 +97,9 @@ static int gapspci_write(struct pci_bus *bus, unsigned int devfn, int where, int
97 return PCIBIOS_DEVICE_NOT_FOUND; 97 return PCIBIOS_DEVICE_NOT_FOUND;
98 98
99 switch (size) { 99 switch (size) {
100 case 1: ctrl_outb(( u8)val, GAPSPCI_BBA_CONFIG+where); break; 100 case 1: outb(( u8)val, GAPSPCI_BBA_CONFIG+where); break;
101 case 2: ctrl_outw((u16)val, GAPSPCI_BBA_CONFIG+where); break; 101 case 2: outw((u16)val, GAPSPCI_BBA_CONFIG+where); break;
102 case 4: ctrl_outl((u32)val, GAPSPCI_BBA_CONFIG+where); break; 102 case 4: outl((u32)val, GAPSPCI_BBA_CONFIG+where); break;
103 } 103 }
104 104
105 return PCIBIOS_SUCCESSFUL; 105 return PCIBIOS_SUCCESSFUL;
@@ -127,36 +127,36 @@ int __init gapspci_init(void)
127 */ 127 */
128 128
129 for (i=0; i<16; i++) 129 for (i=0; i<16; i++)
130 idbuf[i] = ctrl_inb(GAPSPCI_REGS+i); 130 idbuf[i] = inb(GAPSPCI_REGS+i);
131 131
132 if (strncmp(idbuf, "GAPSPCI_BRIDGE_2", 16)) 132 if (strncmp(idbuf, "GAPSPCI_BRIDGE_2", 16))
133 return -ENODEV; 133 return -ENODEV;
134 134
135 ctrl_outl(0x5a14a501, GAPSPCI_REGS+0x18); 135 outl(0x5a14a501, GAPSPCI_REGS+0x18);
136 136
137 for (i=0; i<1000000; i++) 137 for (i=0; i<1000000; i++)
138 ; 138 ;
139 139
140 if (ctrl_inl(GAPSPCI_REGS+0x18) != 1) 140 if (inl(GAPSPCI_REGS+0x18) != 1)
141 return -EINVAL; 141 return -EINVAL;
142 142
143 ctrl_outl(0x01000000, GAPSPCI_REGS+0x20); 143 outl(0x01000000, GAPSPCI_REGS+0x20);
144 ctrl_outl(0x01000000, GAPSPCI_REGS+0x24); 144 outl(0x01000000, GAPSPCI_REGS+0x24);
145 145
146 ctrl_outl(GAPSPCI_DMA_BASE, GAPSPCI_REGS+0x28); 146 outl(GAPSPCI_DMA_BASE, GAPSPCI_REGS+0x28);
147 ctrl_outl(GAPSPCI_DMA_BASE+GAPSPCI_DMA_SIZE, GAPSPCI_REGS+0x2c); 147 outl(GAPSPCI_DMA_BASE+GAPSPCI_DMA_SIZE, GAPSPCI_REGS+0x2c);
148 148
149 ctrl_outl(1, GAPSPCI_REGS+0x14); 149 outl(1, GAPSPCI_REGS+0x14);
150 ctrl_outl(1, GAPSPCI_REGS+0x34); 150 outl(1, GAPSPCI_REGS+0x34);
151 151
152 /* Setting Broadband Adapter */ 152 /* Setting Broadband Adapter */
153 ctrl_outw(0xf900, GAPSPCI_BBA_CONFIG+0x06); 153 outw(0xf900, GAPSPCI_BBA_CONFIG+0x06);
154 ctrl_outl(0x00000000, GAPSPCI_BBA_CONFIG+0x30); 154 outl(0x00000000, GAPSPCI_BBA_CONFIG+0x30);
155 ctrl_outb(0x00, GAPSPCI_BBA_CONFIG+0x3c); 155 outb(0x00, GAPSPCI_BBA_CONFIG+0x3c);
156 ctrl_outb(0xf0, GAPSPCI_BBA_CONFIG+0x0d); 156 outb(0xf0, GAPSPCI_BBA_CONFIG+0x0d);
157 ctrl_outw(0x0006, GAPSPCI_BBA_CONFIG+0x04); 157 outw(0x0006, GAPSPCI_BBA_CONFIG+0x04);
158 ctrl_outl(0x00002001, GAPSPCI_BBA_CONFIG+0x10); 158 outl(0x00002001, GAPSPCI_BBA_CONFIG+0x10);
159 ctrl_outl(0x01000000, GAPSPCI_BBA_CONFIG+0x14); 159 outl(0x01000000, GAPSPCI_BBA_CONFIG+0x14);
160 160
161 return 0; 161 return 0;
162} 162}