Commit 04e2a13336f0e507ef416bbede3be92b79c46594
Committed by
Tom Rini
1 parent
af55e35d33
Exists in
v2017.01-smarct4x
and in
37 other branches
beagleboard: Remove side effects of i2c2 pullup resisters initialization code
Fix typo of commit d4e53f063dd25e071444b87303573e7440deeb89. i2c2 pullup resisters are controlled by bit 0 of CONTROL_PROG_IO1. It's value after reset is 0x00100001. In order to clear bit 0, original code write 0xfffffffe to CONTROL_PROG_IO1 and toggle almost all default values. Original code affect following: * disable i2c1 pullup resisters * increase far end load setting for many modules * setup invalid SC/LB combination Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com> CC: Tom Rini <trini@ti.com> CC: Steve Kipisz <s-kipisz2@ti.com>
Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff
board/ti/beagle/beagle.c
... | ... | @@ -317,9 +317,12 @@ |
317 | 317 | struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; |
318 | 318 | struct control_prog_io *prog_io_base = (struct control_prog_io *)OMAP34XX_CTRL_BASE; |
319 | 319 | bool generate_fake_mac = false; |
320 | + u32 value; | |
320 | 321 | |
321 | 322 | /* Enable i2c2 pullup resisters */ |
322 | - writel(~(PRG_I2C2_PULLUPRESX), &prog_io_base->io1); | |
323 | + value = readl(&prog_io_base->io1); | |
324 | + value &= ~(PRG_I2C2_PULLUPRESX); | |
325 | + writel(value, &prog_io_base->io1); | |
323 | 326 | |
324 | 327 | switch (get_board_revision()) { |
325 | 328 | case REVISION_AXBX: |