Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: audio support for the sh7722 Migo-R board

Configure SIU port B pins and register the WM8978 audio codec.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by

Guennadi Liakhovetski and committed by
Paul Mundt
920925f9 331af0c1

+17
+16
arch/sh/boards/mach-migor/setup.c
··· 419 419 I2C_BOARD_INFO("migor_ts", 0x51), 420 420 .irq = 38, /* IRQ6 */ 421 421 }, 422 + { 423 + I2C_BOARD_INFO("wm8978", 0x1a), 424 + }, 422 425 }; 423 426 424 427 static struct i2c_board_info migor_i2c_camera[] = { ··· 621 618 __raw_writew(__raw_readw(PORT_MSELCRB) | 0x2000, PORT_MSELCRB); /* D15->D8 */ 622 619 623 620 platform_resource_setup_memory(&migor_ceu_device, "ceu", 4 << 20); 621 + 622 + /* SIU: Port B */ 623 + gpio_request(GPIO_FN_SIUBOLR, NULL); 624 + gpio_request(GPIO_FN_SIUBOBT, NULL); 625 + gpio_request(GPIO_FN_SIUBISLD, NULL); 626 + gpio_request(GPIO_FN_SIUBOSLD, NULL); 627 + gpio_request(GPIO_FN_SIUMCKB, NULL); 628 + 629 + /* 630 + * The original driver sets SIUB OLR/OBT, ILR/IBT, and SIUA OLR/OBT to 631 + * output. Need only SIUB, set to output for master mode (table 34.2) 632 + */ 633 + ctrl_outw(ctrl_inw(PORT_MSELCRA) | 1, PORT_MSELCRA); 624 634 625 635 i2c_register_board_info(0, migor_i2c_devices, 626 636 ARRAY_SIZE(migor_i2c_devices));
+1
arch/sh/include/mach-migor/mach/migor.h
··· 1 1 #ifndef __ASM_SH_MIGOR_H 2 2 #define __ASM_SH_MIGOR_H 3 3 4 + #define PORT_MSELCRA 0xa4050180 4 5 #define PORT_MSELCRB 0xa4050182 5 6 #define BSC_CS4BCR 0xfec10010 6 7 #define BSC_CS6ABCR 0xfec1001c