Skip to content

Commit

Permalink
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Browse files Browse the repository at this point in the history
* master.kernel.org:/home/rmk/linux-2.6-arm: (22 commits)
  [ARM] fix section-based ioremap
  [NET] am79c961a: fix spin_lock usage
  [ARM] omap: usb: thou shalt not provide empty release functions
  [ARM] omap: watchdog: allow OMAP watchdog driver on OMAP34xx platforms
  [ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3
  [ARM] clkdev: fix clock matching
  [ARM] 5370/1: at91: fix rm9200 watchdog
  [ARM] 5368/1: arch/arm/mach-davinci/usb.c buildfix
  [ARM] 5365/1: s3cmci: Use new include path of dma.h
  [ARM] fix StrongARM-11x0 page copy implementation
  [ARM] omap: ensure OMAP drivers pass a struct device to clk_get()
  ARM: OMAP: Fix compile for h3 MMC
  ARM: OMAP: Remove unused platform devices, v3
  ARM: OMAP: Fix ASoC by enabling writes to XCCR and RCCR McBSP registers, v3
  ARM: OMAP: Fix OSK ASoC by registering I2C board info for tlvaic23
  ARM: OMAP: remove duplicated #include's
  ARM: OMAP: Fix DMA CCR programming for request line > 63, v3
  ARM: OMAP: Fix gpio.c compile on 15xx with CONFIG_DEBUGFS
  ARM: OMAP: Fix compile for beagle
  ARM: OMAP: Fix gpio by switching to generic gpio calls, v2
  ...
  • Loading branch information
torvalds committed Jan 26, 2009
2 parents cfb901b + 24f11ec commit 5376071
Show file tree
Hide file tree
Showing 38 changed files with 1,355 additions and 568 deletions.
25 changes: 19 additions & 6 deletions arch/arm/common/clkdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,33 @@
static LIST_HEAD(clocks);
static DEFINE_MUTEX(clocks_mutex);

/*
* Find the correct struct clk for the device and connection ID.
* We do slightly fuzzy matching here:
* An entry with a NULL ID is assumed to be a wildcard.
* If an entry has a device ID, it must match
* If an entry has a connection ID, it must match
* Then we take the most specific entry - with the following
* order of precidence: dev+con > dev only > con only.
*/
static struct clk *clk_find(const char *dev_id, const char *con_id)
{
struct clk_lookup *p;
struct clk *clk = NULL;
int match, best = 0;

list_for_each_entry(p, &clocks, node) {
if ((p->dev_id && !dev_id) || (p->con_id && !con_id))
continue;
match = 0;
if (p->dev_id)
match += 2 * (strcmp(p->dev_id, dev_id) == 0);
if (p->con_id)
match += 1 * (strcmp(p->con_id, con_id) == 0);
if (p->dev_id) {
if (!dev_id || strcmp(p->dev_id, dev_id))
continue;
match += 2;
}
if (p->con_id) {
if (!con_id || strcmp(p->con_id, con_id))
continue;
match += 1;
}
if (match == 0)
continue;

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-davinci/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/irqs.h>

#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
static struct musb_hdrc_eps_bits musb_eps[] = {
Expand Down
45 changes: 1 addition & 44 deletions arch/arm/mach-omap1/board-h2.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@
#include <asm/mach/flash.h>
#include <asm/mach/map.h>

#include <mach/gpio-switch.h>
#include <mach/mux.h>
#include <mach/dma.h>
#include <mach/tc.h>
#include <mach/nand.h>
#include <mach/irda.h>
#include <mach/usb.h>
#include <mach/keypad.h>
#include <mach/common.h>
#include <mach/mcbsp.h>
#include <mach/omap-alsa.h>

static int h2_keymap[] = {
KEY(0, 0, KEY_LEFT),
Expand Down Expand Up @@ -292,49 +290,13 @@ static struct platform_device h2_lcd_device = {
.id = -1,
};

static struct omap_mcbsp_reg_cfg mcbsp_regs = {
.spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
.spcr1 = RINTM(3) | RRST,
.rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(1),
.rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
.xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(1) | XFIG,
.xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
.srgr1 = FWID(15),
.srgr2 = GSYNC | CLKSP | FSGM | FPER(31),

.pcr0 = CLKXM | CLKRM | FSXP | FSRP | CLKXP | CLKRP,
/*.pcr0 = CLKXP | CLKRP,*/ /* mcbsp: slave */
};

static struct omap_alsa_codec_config alsa_config = {
.name = "H2 TSC2101",
.mcbsp_regs_alsa = &mcbsp_regs,
.codec_configure_dev = NULL, /* tsc2101_configure, */
.codec_set_samplerate = NULL, /* tsc2101_set_samplerate, */
.codec_clock_setup = NULL, /* tsc2101_clock_setup, */
.codec_clock_on = NULL, /* tsc2101_clock_on, */
.codec_clock_off = NULL, /* tsc2101_clock_off, */
.get_default_samplerate = NULL, /* tsc2101_get_default_samplerate, */
};

static struct platform_device h2_mcbsp1_device = {
.name = "omap_alsa_mcbsp",
.id = 1,
.dev = {
.platform_data = &alsa_config,
},
};

static struct platform_device *h2_devices[] __initdata = {
&h2_nor_device,
&h2_nand_device,
&h2_smc91x_device,
&h2_irda_device,
&h2_kp_device,
&h2_lcd_device,
&h2_mcbsp1_device,
};

static void __init h2_init_smc91x(void)
Expand Down Expand Up @@ -409,11 +371,6 @@ static struct omap_board_config_kernel h2_config[] __initdata = {

#define H2_NAND_RB_GPIO_PIN 62

static int h2_nand_dev_ready(struct omap_nand_platform_data *data)
{
return gpio_get_value(H2_NAND_RB_GPIO_PIN);
}

static void __init h2_init(void)
{
/* Here we assume the NOR boot config: NOR on CS3 (possibly swapped
Expand Down
50 changes: 0 additions & 50 deletions arch/arm/mach-omap1/board-h3.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
#include <mach/keypad.h>
#include <mach/dma.h>
#include <mach/common.h>
#include <mach/mcbsp.h>
#include <mach/omap-alsa.h>

#define H3_TS_GPIO 48

Expand Down Expand Up @@ -387,41 +385,6 @@ static struct spi_board_info h3_spi_board_info[] __initdata = {
},
};

static struct omap_mcbsp_reg_cfg mcbsp_regs = {
.spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
.spcr1 = RINTM(3) | RRST,
.rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(1),
.rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
.xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(1) | XFIG,
.xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
.srgr1 = FWID(15),
.srgr2 = GSYNC | CLKSP | FSGM | FPER(31),

.pcr0 = CLKRM | SCLKME | FSXP | FSRP | CLKXP | CLKRP,
/*.pcr0 = CLKXP | CLKRP,*/ /* mcbsp: slave */
};

static struct omap_alsa_codec_config alsa_config = {
.name = "H3 TSC2101",
.mcbsp_regs_alsa = &mcbsp_regs,
.codec_configure_dev = NULL, /* tsc2101_configure, */
.codec_set_samplerate = NULL, /* tsc2101_set_samplerate, */
.codec_clock_setup = NULL, /* tsc2101_clock_setup, */
.codec_clock_on = NULL, /* tsc2101_clock_on, */
.codec_clock_off = NULL, /* tsc2101_clock_off, */
.get_default_samplerate = NULL, /* tsc2101_get_default_samplerate, */
};

static struct platform_device h3_mcbsp1_device = {
.name = "omap_alsa_mcbsp",
.id = 1,
.dev = {
.platform_data = &alsa_config,
},
};

static struct platform_device *devices[] __initdata = {
&nor_device,
&nand_device,
Expand All @@ -430,7 +393,6 @@ static struct platform_device *devices[] __initdata = {
&h3_irda_device,
&h3_kp_device,
&h3_lcd_device,
&h3_mcbsp1_device,
};

static struct omap_usb_config h3_usb_config __initdata = {
Expand Down Expand Up @@ -472,18 +434,6 @@ static struct i2c_board_info __initdata h3_i2c_board_info[] = {
},
};

static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
{
.name = "mmc_slot",
.gpio = OMAP_MPUIO(1),
.type = OMAP_GPIO_SWITCH_TYPE_COVER,
.debounce_rising = 100,
.debounce_falling = 0,
.notify = h3_mmc_slot_cover_handler,
.notify_data = NULL,
},
};

#define H3_NAND_RB_GPIO_PIN 10

static int nand_dev_ready(struct omap_nand_platform_data *data)
Expand Down
39 changes: 0 additions & 39 deletions arch/arm/mach-omap1/board-innovator.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
#include <mach/usb.h>
#include <mach/keypad.h>
#include <mach/common.h>
#include <mach/mcbsp.h>
#include <mach/omap-alsa.h>
#include <mach/mmc.h>

static int innovator_keymap[] = {
Expand Down Expand Up @@ -115,42 +113,6 @@ static struct platform_device innovator_flash_device = {
.resource = &innovator_flash_resource,
};

#define DEFAULT_BITPERSAMPLE 16

static struct omap_mcbsp_reg_cfg mcbsp_regs = {
.spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
.spcr1 = RINTM(3) | RRST,
.rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0),
.rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
.xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG,
.xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
.srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1),
.srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1),
/*.pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,*/ /* mcbsp: master */
.pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
};

static struct omap_alsa_codec_config alsa_config = {
.name = "OMAP Innovator AIC23",
.mcbsp_regs_alsa = &mcbsp_regs,
.codec_configure_dev = NULL, /* aic23_configure, */
.codec_set_samplerate = NULL, /* aic23_set_samplerate, */
.codec_clock_setup = NULL, /* aic23_clock_setup, */
.codec_clock_on = NULL, /* aic23_clock_on, */
.codec_clock_off = NULL, /* aic23_clock_off, */
.get_default_samplerate = NULL, /* aic23_get_default_samplerate, */
};

static struct platform_device innovator_mcbsp1_device = {
.name = "omap_alsa_mcbsp",
.id = 1,
.dev = {
.platform_data = &alsa_config,
},
};

static struct resource innovator_kp_resources[] = {
[0] = {
.start = INT_KEYBOARD,
Expand Down Expand Up @@ -227,7 +189,6 @@ static struct platform_device innovator1510_spi_device = {
static struct platform_device *innovator1510_devices[] __initdata = {
&innovator_flash_device,
&innovator1510_smc91x_device,
&innovator_mcbsp1_device,
&innovator_kp_device,
&innovator1510_lcd_device,
&innovator1510_spi_device,
Expand Down
8 changes: 7 additions & 1 deletion arch/arm/mach-omap1/board-nokia770.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include <mach/keypad.h>
#include <mach/common.h>
#include <mach/dsp_common.h>
#include <mach/aic23.h>
#include <mach/omapfb.h>
#include <mach/lcd_mipid.h>
#include <mach/mmc.h>
Expand Down Expand Up @@ -261,6 +260,13 @@ static DEFINE_MUTEX(audio_pwr_lock);
*/
static int audio_pwr_state = -1;

static inline void aic23_power_up(void)
{
}
static inline void aic23_power_down(void)
{
}

/*
* audio_pwr_up / down should be called under audio_pwr_lock
*/
Expand Down
43 changes: 3 additions & 40 deletions arch/arm/mach-omap1/board-osk.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
#include <mach/mux.h>
#include <mach/tc.h>
#include <mach/common.h>
#include <mach/mcbsp.h>
#include <mach/omap-alsa.h>

static struct mtd_partition osk_partitions[] = {
/* bootloader (U-Boot, etc) in first sector */
Expand Down Expand Up @@ -141,47 +139,10 @@ static struct platform_device osk5912_cf_device = {
.resource = osk5912_cf_resources,
};

#define DEFAULT_BITPERSAMPLE 16

static struct omap_mcbsp_reg_cfg mcbsp_regs = {
.spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
.spcr1 = RINTM(3) | RRST,
.rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0),
.rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
.xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG,
.xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
.srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1),
.srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1),
/*.pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,*/ /* mcbsp: master */
.pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
};

static struct omap_alsa_codec_config alsa_config = {
.name = "OSK AIC23",
.mcbsp_regs_alsa = &mcbsp_regs,
.codec_configure_dev = NULL, /* aic23_configure, */
.codec_set_samplerate = NULL, /* aic23_set_samplerate, */
.codec_clock_setup = NULL, /* aic23_clock_setup, */
.codec_clock_on = NULL, /* aic23_clock_on, */
.codec_clock_off = NULL, /* aic23_clock_off, */
.get_default_samplerate = NULL, /* aic23_get_default_samplerate, */
};

static struct platform_device osk5912_mcbsp1_device = {
.name = "omap_alsa_mcbsp",
.id = 1,
.dev = {
.platform_data = &alsa_config,
},
};

static struct platform_device *osk5912_devices[] __initdata = {
&osk5912_flash_device,
&osk5912_smc91x_device,
&osk5912_cf_device,
&osk5912_mcbsp1_device,
};

static struct gpio_led tps_leds[] = {
Expand Down Expand Up @@ -259,8 +220,10 @@ static struct i2c_board_info __initdata osk_i2c_board_info[] = {
.platform_data = &tps_board,

},
{
I2C_BOARD_INFO("tlv320aic23", 0x1B),
},
/* TODO when driver support is ready:
* - aic23 audio chip at 0x1a
* - optionally on Mistral, ov9640 camera sensor at 0x30
*/
};
Expand Down
Loading

0 comments on commit 5376071

Please sign in to comment.