Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104074
b: refs/heads/master
c: 99cdb0c
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Zabel authored and Samuel Ortiz committed Jul 20, 2008
1 parent 8529b48 commit 7b459bc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 279cac484e55317456900fe3567c7cb5bd46fd5f
refs/heads/master: 99cdb0c8c5e0e43652d25951a85bac82a1231591
11 changes: 5 additions & 6 deletions trunk/drivers/mfd/asic3.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ static int __init asic3_irq_probe(struct platform_device *pdev)
struct asic3 *asic = platform_get_drvdata(pdev);
unsigned long clksel = 0;
unsigned int irq, irq_base;
int map_size;

asic->irq_nr = platform_get_irq(pdev, 0);
if (asic->irq_nr < 0)
Expand Down Expand Up @@ -551,8 +552,8 @@ static int __init asic3_probe(struct platform_device *pdev)
goto out_free;
}


asic->mapping = ioremap(mem->start, PAGE_SIZE);
map_size = mem->end - mem->start + 1;
asic->mapping = ioremap(mem->start, map_size);
if (!asic->mapping) {
ret = -ENOMEM;
dev_err(asic->dev, "Couldn't ioremap\n");
Expand All @@ -561,10 +562,8 @@ static int __init asic3_probe(struct platform_device *pdev)

asic->irq_base = pdata->irq_base;

if (pdata && pdata->bus_shift)
asic->bus_shift = 2 - pdata->bus_shift;
else
asic->bus_shift = 0;
/* calculate bus shift from mem resource */
asic->bus_shift = 2 - (map_size >> 12);

clksel = 0;
asic3_write_register(asic, ASIC3_OFFSET(CLOCK, SEL), clksel);
Expand Down
5 changes: 2 additions & 3 deletions trunk/include/linux/mfd/asic3.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ struct asic3_platform_data {
u16 *gpio_config;
unsigned int gpio_config_num;

unsigned int bus_shift;

unsigned int irq_base;

unsigned int gpio_base;
Expand Down Expand Up @@ -498,6 +496,7 @@ struct asic3_platform_data {
#define ASIC3_SDIO_CTRL_LEDCtrl 0x7C
#define ASIC3_SDIO_CTRL_SoftwareReset 0x1C0

#define ASIC3_MAP_SIZE 0x2000
#define ASIC3_MAP_SIZE_32BIT 0x2000
#define ASIC3_MAP_SIZE_16BIT 0x1000

#endif /* __ASIC3_H__ */

0 comments on commit 7b459bc

Please sign in to comment.