setup.c (ebf8889bd1fe3615991ff4494635d237280652a2) | setup.c (8ff374b9c296b96484d5e63b45b22d0862ffee8f) |
---|---|
1/* 2 * Copyright (C) 2000,2001,2002,2003,2004 Broadcom Corporation 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * --- 8 unchanged lines hidden (view full) --- 17 */ 18#include <linux/init.h> 19#include <linux/kernel.h> 20#include <linux/module.h> 21#include <linux/reboot.h> 22#include <linux/string.h> 23 24#include <asm/bootinfo.h> | 1/* 2 * Copyright (C) 2000,2001,2002,2003,2004 Broadcom Corporation 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * --- 8 unchanged lines hidden (view full) --- 17 */ 18#include <linux/init.h> 19#include <linux/kernel.h> 20#include <linux/module.h> 21#include <linux/reboot.h> 22#include <linux/string.h> 23 24#include <asm/bootinfo.h> |
25#include <asm/cpu.h> |
|
25#include <asm/mipsregs.h> 26#include <asm/io.h> 27#include <asm/sibyte/sb1250.h> 28 29#include <asm/sibyte/bcm1480_regs.h> 30#include <asm/sibyte/bcm1480_scd.h> 31#include <asm/sibyte/sb1250_scd.h> 32 --- 81 unchanged lines hidden (view full) --- 114 return ret; 115} 116 117void __init bcm1480_setup(void) 118{ 119 uint64_t sys_rev; 120 int plldiv; 121 | 26#include <asm/mipsregs.h> 27#include <asm/io.h> 28#include <asm/sibyte/sb1250.h> 29 30#include <asm/sibyte/bcm1480_regs.h> 31#include <asm/sibyte/bcm1480_scd.h> 32#include <asm/sibyte/sb1250_scd.h> 33 --- 81 unchanged lines hidden (view full) --- 115 return ret; 116} 117 118void __init bcm1480_setup(void) 119{ 120 uint64_t sys_rev; 121 int plldiv; 122 |
122 sb1_pass = read_c0_prid() & 0xff; | 123 sb1_pass = read_c0_prid() & PRID_REV_MASK; |
123 sys_rev = __raw_readq(IOADDR(A_SCD_SYSTEM_REVISION)); 124 soc_type = SYS_SOC_TYPE(sys_rev); 125 part_type = G_SYS_PART(sys_rev); 126 soc_pass = G_SYS_REVISION(sys_rev); 127 128 if (sys_rev_decode()) { 129 printk("Restart after failure to identify SiByte chip\n"); 130 machine_restart(NULL); 131 } 132 133 plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG))); 134 zbbus_mhz = ((plldiv >> 1) * 50) + ((plldiv & 1) * 25); 135 136 printk("Broadcom SiByte %s %s @ %d MHz (SB-1A rev %d)\n", 137 soc_str, pass_str, zbbus_mhz * 2, sb1_pass); 138 printk("Board type: %s\n", get_system_type()); 139} | 124 sys_rev = __raw_readq(IOADDR(A_SCD_SYSTEM_REVISION)); 125 soc_type = SYS_SOC_TYPE(sys_rev); 126 part_type = G_SYS_PART(sys_rev); 127 soc_pass = G_SYS_REVISION(sys_rev); 128 129 if (sys_rev_decode()) { 130 printk("Restart after failure to identify SiByte chip\n"); 131 machine_restart(NULL); 132 } 133 134 plldiv = G_BCM1480_SYS_PLL_DIV(__raw_readq(IOADDR(A_SCD_SYSTEM_CFG))); 135 zbbus_mhz = ((plldiv >> 1) * 50) + ((plldiv & 1) * 25); 136 137 printk("Broadcom SiByte %s %s @ %d MHz (SB-1A rev %d)\n", 138 soc_str, pass_str, zbbus_mhz * 2, sb1_pass); 139 printk("Board type: %s\n", get_system_type()); 140} |