From 920925f90fa6455f7e8c9db0e215e706cd7dedeb Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Tue, 19 Jan 2010 08:09:10 +0000 Subject: 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 Signed-off-by: Paul Mundt --- arch/sh/boards/mach-migor/setup.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'arch/sh/boards/mach-migor/setup.c') diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index be300aaca6f..dc2ddc2c2d8 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c @@ -419,6 +419,9 @@ static struct i2c_board_info migor_i2c_devices[] = { I2C_BOARD_INFO("migor_ts", 0x51), .irq = 38, /* IRQ6 */ }, + { + I2C_BOARD_INFO("wm8978", 0x1a), + }, }; static struct i2c_board_info migor_i2c_camera[] = { @@ -619,6 +622,19 @@ static int __init migor_devices_setup(void) platform_resource_setup_memory(&migor_ceu_device, "ceu", 4 << 20); + /* SIU: Port B */ + gpio_request(GPIO_FN_SIUBOLR, NULL); + gpio_request(GPIO_FN_SIUBOBT, NULL); + gpio_request(GPIO_FN_SIUBISLD, NULL); + gpio_request(GPIO_FN_SIUBOSLD, NULL); + gpio_request(GPIO_FN_SIUMCKB, NULL); + + /* + * The original driver sets SIUB OLR/OBT, ILR/IBT, and SIUA OLR/OBT to + * output. Need only SIUB, set to output for master mode (table 34.2) + */ + ctrl_outw(ctrl_inw(PORT_MSELCRA) | 1, PORT_MSELCRA); + i2c_register_board_info(0, migor_i2c_devices, ARRAY_SIZE(migor_i2c_devices)); -- cgit v1.2.3-70-g09d2 From 7d0b0a4434dd97d8e0731241aee586460f7fb7bd Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 2 Mar 2010 11:52:28 +0900 Subject: sh: Fix up ctrl_read/write stragglers in migor setup. ctrl_read/writeX are deprecated, this converts them over to their __raw_read/write() counterparts. Signed-off-by: Paul Mundt --- arch/sh/boards/mach-migor/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/sh/boards/mach-migor/setup.c') diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c index dc2ddc2c2d8..7da0fc94a01 100644 --- a/arch/sh/boards/mach-migor/setup.c +++ b/arch/sh/boards/mach-migor/setup.c @@ -633,7 +633,7 @@ static int __init migor_devices_setup(void) * The original driver sets SIUB OLR/OBT, ILR/IBT, and SIUA OLR/OBT to * output. Need only SIUB, set to output for master mode (table 34.2) */ - ctrl_outw(ctrl_inw(PORT_MSELCRA) | 1, PORT_MSELCRA); + __raw_writew(__raw_readw(PORT_MSELCRA) | 1, PORT_MSELCRA); i2c_register_board_info(0, migor_i2c_devices, ARRAY_SIZE(migor_i2c_devices)); -- cgit v1.2.3-70-g09d2