-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 113202 b: refs/heads/master c: 6ee6c6a h: refs/heads/master v: v3
- Loading branch information
Pierre Ossman
committed
Oct 12, 2008
1 parent
3bf7b51
commit 8578ce8
Showing
81 changed files
with
586 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 5e7184ae0dd49456387e8b1cdebc6b2c92fc6d51 | ||
refs/heads/master: 6ee6c6adf1cfebbf432b8d1f204c7f96e395933e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
obj-y := setup.o rtc_xicor1241.o rtc_m41t81.o | ||
obj-y := platform.o setup.o rtc_xicor1241.o \ | ||
rtc_m41t81.o | ||
|
||
obj-$(CONFIG_I2C_BOARDINFO) += swarm-i2c.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#include <linux/err.h> | ||
#include <linux/kernel.h> | ||
#include <linux/init.h> | ||
#include <linux/io.h> | ||
#include <linux/platform_device.h> | ||
#include <linux/ata_platform.h> | ||
|
||
#include <asm/sibyte/board.h> | ||
#include <asm/sibyte/sb1250_genbus.h> | ||
#include <asm/sibyte/sb1250_regs.h> | ||
|
||
#if defined(CONFIG_SIBYTE_SWARM) || defined(CONFIG_SIBYTE_LITTLESUR) | ||
|
||
#define DRV_NAME "pata-swarm" | ||
|
||
#define SWARM_IDE_SHIFT 5 | ||
#define SWARM_IDE_BASE 0x1f0 | ||
#define SWARM_IDE_CTRL 0x3f6 | ||
|
||
static struct resource swarm_pata_resource[] = { | ||
{ | ||
.name = "Swarm GenBus IDE", | ||
.flags = IORESOURCE_MEM, | ||
}, { | ||
.name = "Swarm GenBus IDE", | ||
.flags = IORESOURCE_MEM, | ||
}, { | ||
.name = "Swarm GenBus IDE", | ||
.flags = IORESOURCE_IRQ, | ||
.start = K_INT_GB_IDE, | ||
.end = K_INT_GB_IDE, | ||
}, | ||
}; | ||
|
||
static struct pata_platform_info pata_platform_data = { | ||
.ioport_shift = SWARM_IDE_SHIFT, | ||
}; | ||
|
||
static struct platform_device swarm_pata_device = { | ||
.name = "pata_platform", | ||
.id = -1, | ||
.resource = swarm_pata_resource, | ||
.num_resources = ARRAY_SIZE(swarm_pata_resource), | ||
.dev = { | ||
.platform_data = &pata_platform_data, | ||
.coherent_dma_mask = ~0, /* grumble */ | ||
}, | ||
}; | ||
|
||
static int __init swarm_pata_init(void) | ||
{ | ||
u8 __iomem *base; | ||
phys_t offset, size; | ||
struct resource *r; | ||
|
||
if (!SIBYTE_HAVE_IDE) | ||
return -ENODEV; | ||
|
||
base = ioremap(A_IO_EXT_BASE, 0x800); | ||
offset = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_START_ADDR, IDE_CS)); | ||
size = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_MULT_SIZE, IDE_CS)); | ||
iounmap(base); | ||
|
||
offset = G_IO_START_ADDR(offset) << S_IO_ADDRBASE; | ||
size = (G_IO_MULT_SIZE(size) + 1) << S_IO_REGSIZE; | ||
if (offset < A_PHYS_GENBUS || offset >= A_PHYS_GENBUS_END) { | ||
pr_info(DRV_NAME ": PATA interface at GenBus disabled\n"); | ||
|
||
return -EBUSY; | ||
} | ||
|
||
pr_info(DRV_NAME ": PATA interface at GenBus slot %i\n", IDE_CS); | ||
|
||
r = swarm_pata_resource; | ||
r[0].start = offset + (SWARM_IDE_BASE << SWARM_IDE_SHIFT); | ||
r[0].end = offset + ((SWARM_IDE_BASE + 8) << SWARM_IDE_SHIFT) - 1; | ||
r[1].start = offset + (SWARM_IDE_CTRL << SWARM_IDE_SHIFT); | ||
r[1].end = offset + ((SWARM_IDE_CTRL + 1) << SWARM_IDE_SHIFT) - 1; | ||
|
||
return platform_device_register(&swarm_pata_device); | ||
} | ||
|
||
device_initcall(swarm_pata_init); | ||
|
||
#endif /* defined(CONFIG_SIBYTE_SWARM) || defined(CONFIG_SIBYTE_LITTLESUR) */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.