Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112505
b: refs/heads/master
c: ebe35af
h: refs/heads/master
i:
  112503: d1304ea
v: v3
  • Loading branch information
Lennert Buytenhek authored and Nicolas Pitre committed Sep 25, 2008
1 parent 38e0bf9 commit b06d6c3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 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: 1f8081f539a80c3d36a17ecd094d104eae60c01c
refs/heads/master: ebe35aff883496c07248df82c8576c3b6e84bbbe
21 changes: 16 additions & 5 deletions trunk/arch/arm/mach-orion5x/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ void __init orion5x_ehci1_init(void)
****************************************************************************/
struct mv643xx_eth_shared_platform_data orion5x_eth_shared_data = {
.dram = &orion5x_mbus_dram_info,
.t_clk = ORION5X_TCLK,
};

static struct resource orion5x_eth_shared_resources[] = {
Expand Down Expand Up @@ -282,7 +281,7 @@ static struct plat_serial8250_port orion5x_uart0_data[] = {
.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = ORION5X_TCLK,
.uartclk = 0,
}, {
},
};
Expand Down Expand Up @@ -326,7 +325,7 @@ static struct plat_serial8250_port orion5x_uart1_data[] = {
.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = ORION5X_TCLK,
.uartclk = 0,
}, {
},
};
Expand Down Expand Up @@ -459,9 +458,17 @@ void __init orion5x_xor_init(void)
/*****************************************************************************
* Time handling
****************************************************************************/
int orion5x_tclk;

int __init orion5x_find_tclk(void)
{
return 166666667;
}

static void orion5x_timer_init(void)
{
orion_time_init(IRQ_ORION5X_BRIDGE, ORION5X_TCLK);
orion5x_tclk = orion5x_find_tclk();
orion_time_init(IRQ_ORION5X_BRIDGE, orion5x_tclk);
}

struct sys_timer orion5x_timer = {
Expand Down Expand Up @@ -514,7 +521,11 @@ void __init orion5x_init(void)
u32 dev, rev;

orion5x_id(&dev, &rev, &dev_name);
printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, ORION5X_TCLK);
printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk);

orion5x_eth_shared_data.t_clk = orion5x_tclk;
orion5x_uart0_data[0].uartclk = orion5x_tclk;
orion5x_uart1_data[0].uartclk = orion5x_tclk;

/*
* Setup Orion address map
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-orion5x/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ struct mv_sata_platform_data;
void orion5x_map_io(void);
void orion5x_init_irq(void);
void orion5x_init(void);
extern int orion5x_tclk;
extern struct sys_timer orion5x_timer;

/*
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/arm/mach-orion5x/include/mach/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@
*/

#define CLOCK_TICK_RATE (100 * HZ)

#define ORION5X_TCLK 166666667
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-orion5x/kurobox_pro-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ static void kurobox_pro_power_off(void)
const unsigned char shutdownwait[] = {0x00, 0x0c};
const unsigned char poweroff[] = {0x00, 0x06};
/* 38400 baud divisor */
const unsigned divisor = ((ORION5X_TCLK + (8 * 38400)) / (16 * 38400));
const unsigned divisor = ((orion5x_tclk + (8 * 38400)) / (16 * 38400));

pr_info("%s: triggering power-off...\n", __func__);

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-orion5x/tsx09-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/timex.h>
#include <linux/serial_reg.h>
#include "tsx09-common.h"
#include "common.h"

/*****************************************************************************
* QNAP TS-x09 specific power off method via UART1-attached PIC
Expand All @@ -26,7 +27,7 @@
void qnap_tsx09_power_off(void)
{
/* 19200 baud divisor */
const unsigned divisor = ((ORION5X_TCLK + (8 * 19200)) / (16 * 19200));
const unsigned divisor = ((orion5x_tclk + (8 * 19200)) / (16 * 19200));

pr_info("%s: triggering power-off...\n", __func__);

Expand Down

0 comments on commit b06d6c3

Please sign in to comment.