Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99226
b: refs/heads/master
c: 60ed795
h: refs/heads/master
v: v3
  • Loading branch information
Alex authored and Haavard Skinnemoen committed Jun 27, 2008
1 parent a965bcc commit 25f4f37
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 9 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: 8bd8974fcddc468d66bd67f33c578f37987b302e
refs/heads/master: 60ed7951d0c9bf8de8588384134f16474367b410
7 changes: 7 additions & 0 deletions trunk/arch/avr32/boards/atngw100/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
#include <asm/arch/init.h>
#include <asm/arch/portmux.h>

/* Oscillator frequencies. These are board-specific */
unsigned long at32_board_osc_rates[3] = {
[0] = 32768, /* 32.768 kHz on RTC osc */
[1] = 20000000, /* 20 MHz on osc0 */
[2] = 12000000, /* 12 MHz on osc1 */
};

/* Initialized by bootloader-specific startup code. */
struct tag *bootloader_tags __initdata;

Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/avr32/boards/atstk1000/atstk1002.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@

#include "atstk1000.h"

/* Oscillator frequencies. These are board specific */
unsigned long at32_board_osc_rates[3] = {
[0] = 32768, /* 32.768 kHz on RTC osc */
[1] = 20000000, /* 20 MHz on osc0 */
[2] = 12000000, /* 12 MHz on osc1 */
};

struct eth_addr {
u8 addr[6];
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/avr32/boards/atstk1000/atstk1003.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@

#include "atstk1000.h"

/* Oscillator frequencies. These are board specific */
unsigned long at32_board_osc_rates[3] = {
[0] = 32768, /* 32.768 kHz on RTC osc */
[1] = 20000000, /* 20 MHz on osc0 */
[2] = 12000000, /* 12 MHz on osc1 */
};

#ifdef CONFIG_BOARD_ATSTK1000_EXTDAC
static struct at73c213_board_info at73c213_data = {
.ssc_id = 0,
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/avr32/boards/atstk1000/atstk1004.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@

#include "atstk1000.h"

/* Oscillator frequencies. These are board specific */
unsigned long at32_board_osc_rates[3] = {
[0] = 32768, /* 32.768 kHz on RTC osc */
[1] = 20000000, /* 20 MHz on osc0 */
[2] = 12000000, /* 12 MHz on osc1 */
};

#ifdef CONFIG_BOARD_ATSTK1000_EXTDAC
static struct at73c213_board_info at73c213_data = {
.ssc_id = 0,
Expand Down
9 changes: 1 addition & 8 deletions trunk/arch/avr32/mach-at32ap/at32ap700x.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,12 @@ static struct clk devname##_##_name = { \

static DEFINE_SPINLOCK(pm_lock);

unsigned long at32ap7000_osc_rates[3] = {
[0] = 32768,
/* FIXME: these are ATSTK1002-specific */
[1] = 20000000,
[2] = 12000000,
};

static struct clk osc0;
static struct clk osc1;

static unsigned long osc_get_rate(struct clk *clk)
{
return at32ap7000_osc_rates[clk->index];
return at32_board_osc_rates[clk->index];
}

static unsigned long pll_get_rate(struct clk *clk, unsigned long control)
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/asm-avr32/arch-at32ap/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

#define GPIO_PIN_NONE (-1)

/*
* Clock rates for various on-board oscillators. The number of entries
* in this array is chip-dependent.
*/
extern unsigned long at32_board_osc_rates[];

/* Add basic devices: system manager, interrupt controller, portmuxes, etc. */
void at32_add_system_devices(void);

Expand Down

0 comments on commit 25f4f37

Please sign in to comment.