Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192107
b: refs/heads/master
c: c78a5bc
h: refs/heads/master
i:
  192105: 28af399
  192103: 5ee786f
v: v3
  • Loading branch information
Cyril Chemparathy authored and Kevin Hilman committed May 6, 2010
1 parent a0ee0aa commit ed35cc1
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b3a05ca911688c53680f2b020a1512b9da29c89
refs/heads/master: c78a5bc2e77e8fc5be29cda5b28c9b9afd0f4b6d
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-davinci/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv,
unsigned int mult, unsigned int postdiv);

extern struct platform_device davinci_wdt_device;
extern void davinci_watchdog_reset(struct platform_device *);

#endif

Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-davinci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info)
local_flush_tlb_all();
flush_cache_all();

if (!davinci_soc_info.reset)
davinci_soc_info.reset = davinci_watchdog_reset;

/*
* We want to check CPU revision early for cpu_is_xxxx() macros.
* IO space mapping must be initialized before we can do that.
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-davinci/da830.c
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,7 @@ static struct davinci_soc_info davinci_soc_info_da830 = {
.gpio_irq = IRQ_DA8XX_GPIO0,
.serial_dev = &da8xx_serial_device,
.emac_pdata = &da8xx_emac_pdata,
.reset_device = &da8xx_wdt_device,
};

void __init da830_init(void)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-davinci/da850.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,7 @@ static struct davinci_soc_info davinci_soc_info_da850 = {
.emac_pdata = &da8xx_emac_pdata,
.sram_dma = DA8XX_ARM_RAM_BASE,
.sram_len = SZ_8K,
.reset_device = &da8xx_wdt_device,
};

void __init da850_init(void)
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-davinci/devices-da8xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static struct resource da8xx_watchdog_resources[] = {
},
};

struct platform_device davinci_wdt_device = {
struct platform_device da8xx_wdt_device = {
.name = "watchdog",
.id = -1,
.num_resources = ARRAY_SIZE(da8xx_watchdog_resources),
Expand All @@ -335,7 +335,7 @@ struct platform_device davinci_wdt_device = {

int __init da8xx_register_watchdog(void)
{
return platform_device_register(&davinci_wdt_device);
return platform_device_register(&da8xx_wdt_device);
}

static struct resource da8xx_emac_resources[] = {
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-davinci/dm355.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ static struct davinci_soc_info davinci_soc_info_dm355 = {
.serial_dev = &dm355_serial_device,
.sram_dma = 0x00010000,
.sram_len = SZ_32K,
.reset_device = &davinci_wdt_device,
};

void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-davinci/dm365.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ static struct davinci_soc_info davinci_soc_info_dm365 = {
.emac_pdata = &dm365_emac_pdata,
.sram_dma = 0x00010000,
.sram_len = SZ_32K,
.reset_device = &davinci_wdt_device,
};

void __init dm365_init_asp(struct snd_platform_data *pdata)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-davinci/dm644x.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ static struct davinci_soc_info davinci_soc_info_dm644x = {
.emac_pdata = &dm644x_emac_pdata,
.sram_dma = 0x00008000,
.sram_len = SZ_16K,
.reset_device = &davinci_wdt_device,
};

void __init dm644x_init_asp(struct snd_platform_data *pdata)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-davinci/dm646x.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ static struct davinci_soc_info davinci_soc_info_dm646x = {
.emac_pdata = &dm646x_emac_pdata,
.sram_dma = 0x10010000,
.sram_len = SZ_32K,
.reset_device = &davinci_wdt_device,
};

void __init dm646x_init_mcasp0(struct snd_platform_data *pdata)
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-davinci/include/mach/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ struct davinci_soc_info {
struct emac_platform_data *emac_pdata;
dma_addr_t sram_dma;
unsigned sram_len;
struct platform_device *reset_device;
void (*reset)(struct platform_device *);
};

extern struct davinci_soc_info davinci_soc_info;
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-davinci/include/mach/da8xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ extern struct emac_platform_data da8xx_emac_pdata;
extern struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata;
extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata;

extern struct platform_device da8xx_wdt_device;

extern const short da830_emif25_pins[];
extern const short da830_spi0_pins[];
extern const short da830_spi1_pins[];
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/arm/mach-davinci/include/mach/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifndef __ASM_ARCH_SYSTEM_H
#define __ASM_ARCH_SYSTEM_H

extern void davinci_watchdog_reset(void);
#include <mach/common.h>

static inline void arch_idle(void)
{
Expand All @@ -20,7 +20,8 @@ static inline void arch_idle(void)

static inline void arch_reset(char mode, const char *cmd)
{
davinci_watchdog_reset();
if (davinci_soc_info.reset)
davinci_soc_info.reset(davinci_soc_info.reset_device);
}

#endif /* __ASM_ARCH_SYSTEM_H */
9 changes: 6 additions & 3 deletions trunk/arch/arm/mach-davinci/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,16 @@ struct sys_timer davinci_timer = {


/* reset board using watchdog timer */
void davinci_watchdog_reset(void)
void davinci_watchdog_reset(struct platform_device *pdev)
{
u32 tgcr, wdtcr;
struct platform_device *pdev = &davinci_wdt_device;
void __iomem *base = IO_ADDRESS(pdev->resource[0].start);
void __iomem *base;
struct clk *wd_clk;

base = ioremap(pdev->resource[0].start, SZ_4K);
if (WARN_ON(!base))
return;

wd_clk = clk_get(&pdev->dev, NULL);
if (WARN_ON(IS_ERR(wd_clk)))
return;
Expand Down

0 comments on commit ed35cc1

Please sign in to comment.