Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Author: FrankBuss <[email protected]> 2012-05-22 20:00:25
- Committer: FrankBuss <[email protected]> 2012-05-22 20:00:25
- Parent: a8191c0ea9026890a00364e98bf6cf53397513a3 (i2c-bcm2708: clean up; enable BSC1)
- Branch: rpi-3.2.17
- Follows: v3.2
- Precedes:
- testing the 3rd BSC module
- ----------------------- arch/arm/mach-bcm2708/bcm2708.c -----------------------
- index 0207807..00bc428 100644
- @@ -232,6 +232,9 @@ static struct clk_lookup lookups[] = {
- }, { /* BSC1 */
- .dev_id = "bcm2708_i2c.1",
- .clk = &sdhost_clk,
- + }, { /* BSC2 */
- + .dev_id = "bcm2708_i2c.2",
- + .clk = &sdhost_clk,
- }
- };
- @@ -548,6 +551,25 @@ static struct platform_device bcm2708_bsc1_device = {
- .resource = bcm2708_bsc1_resources,
- };
- +static struct resource bcm2708_bsc2_resources[] = {
- + {
- + .start = BSC2_BASE,
- + .end = BSC2_BASE + SZ_256 - 1,
- + .flags = IORESOURCE_MEM,
- + }, {
- + .start = INTERRUPT_I2C,
- + .end = INTERRUPT_I2C,
- + .flags = IORESOURCE_IRQ,
- + }
- +};
- +
- +static struct platform_device bcm2708_bsc2_device = {
- + .name = "bcm2708_i2c",
- + .id = 2,
- + .num_resources = ARRAY_SIZE(bcm2708_bsc2_resources),
- + .resource = bcm2708_bsc2_resources,
- +};
- +
- int __init bcm_register_device(struct platform_device *pdev)
- {
- int ret;
- @@ -590,6 +612,7 @@ void __init bcm2708_init(void)
- bcm_register_device(&bcm2708_spi_device);
- bcm_register_device(&bcm2708_bsc0_device);
- bcm_register_device(&bcm2708_bsc1_device);
- + bcm_register_device(&bcm2708_bsc2_device);
- #ifdef CONFIG_BCM2708_VCMEM
- {
- ---------------- arch/arm/mach-bcm2708/include/mach/platform.h ----------------
- index d038597..582798a 100644
- @@ -69,6 +69,7 @@
- #define EMMC_BASE (BCM2708_PERI_BASE + 0x300000) /* eMMC interface */
- #define SMI_BASE (BCM2708_PERI_BASE + 0x600000) /* SMI */
- #define BSC1_BASE (BCM2708_PERI_BASE + 0x804000) /* BSC1 I2C/TWI */
- +#define BSC2_BASE (BCM2708_PERI_BASE + 0x805000) /* BSC2 I2C/TWI */
- #define USB_BASE (BCM2708_PERI_BASE + 0x980000) /* DTC_OTG USB controller */
- #define MCORE_BASE (BCM2708_PERI_BASE + 0x0000) /* Fake frame buffer device (actually the multicore sync block*/
- ----------------------- drivers/i2c/busses/i2c-bcm2708.c -----------------------
- index 067c635..8d2fbf2 100644
- @@ -309,6 +309,9 @@ static int __devinit bcm2708_i2c_probe(struct platform_device *pdev)
- case 1:
- adap->class = I2C_CLASS_DDC;
- break;
- + case 2:
- + adap->class = I2C_CLASS_DDC;
- + break;
- default:
- dev_err(&pdev->dev, "can only bind to BSC 0 or 1\n");
- err = -ENXIO;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement