update /proc/cpuinfo
This commit is contained in:
parent
50d5536d03
commit
7581bba58e
@ -4,7 +4,7 @@
|
||||
interrupt-parent = <0x1>;
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "Bananapi M4Berry";
|
||||
model = "Bananapi BPI-M4Berry";
|
||||
compatible = "allwinner,h616", "arm,sun50iw9p1";
|
||||
|
||||
aliases {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
interrupt-parent = <0x1>;
|
||||
#address-cells = <0x2>;
|
||||
#size-cells = <0x2>;
|
||||
model = "Bananapi M4Zero";
|
||||
model = "Bananapi BPI-M4Zero";
|
||||
compatible = "allwinner,h616", "arm,sun50iw9p1";
|
||||
|
||||
aliases {
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/sunxi-sid.h>
|
||||
|
||||
/*
|
||||
* In case the boot CPU is hotpluggable, we record its initial state and
|
||||
@ -128,6 +129,10 @@ static int c_show(struct seq_file *m, void *v)
|
||||
{
|
||||
int i, j;
|
||||
bool compat = personality(current->personality) == PER_LINUX32;
|
||||
#if defined(CONFIG_BOARD_BANANAPI_M4BERRY) || defined(CONFIG_BOARD_BANANAPI_M4ZERO)
|
||||
int databuf[4] = {0};
|
||||
char tmpbuf[129] = {0};
|
||||
#endif
|
||||
|
||||
for_each_online_cpu(i) {
|
||||
struct cpuinfo_arm64 *cpuinfo = &per_cpu(cpu_data, i);
|
||||
@ -179,6 +184,22 @@ static int c_show(struct seq_file *m, void *v)
|
||||
seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr));
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BOARD_BANANAPI_M4BERRY) || defined(CONFIG_BOARD_BANANAPI_M4ZERO)
|
||||
/* platform */
|
||||
sunxi_get_platform(tmpbuf, 129);
|
||||
seq_printf(m, "CPU Platform\t: %s\n", tmpbuf);
|
||||
|
||||
/* chipid */
|
||||
sunxi_get_soc_chipid((u8 *)databuf);
|
||||
for (i = 0; i < 4; i++)
|
||||
sprintf(tmpbuf + i*8, "%08x", databuf[i]);
|
||||
tmpbuf[128] = 0;
|
||||
seq_printf(m, "Serial\t\t: %s\n", tmpbuf);
|
||||
|
||||
seq_printf(m, "Hardware\t: %s\n", machine_name);
|
||||
seq_printf(m, "Revision\t: %04x\n\n", system_rev);
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -56,6 +56,14 @@ static struct resource *standard_resources;
|
||||
|
||||
phys_addr_t __fdt_pointer __initdata;
|
||||
|
||||
#if defined(CONFIG_BOARD_BANANAPI_M4BERRY) || defined(CONFIG_BOARD_BANANAPI_M4ZERO)
|
||||
const char *machine_name = "Bananapi BPI Ref.";
|
||||
EXPORT_SYMBOL(machine_name);
|
||||
|
||||
unsigned int system_rev = 0;
|
||||
EXPORT_SYMBOL(system_rev);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Standard memory resources
|
||||
*/
|
||||
@ -197,6 +205,16 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
|
||||
|
||||
pr_info("Machine model: %s\n", name);
|
||||
dump_stack_set_arch_desc("%s (DT)", name);
|
||||
|
||||
/* bpi */
|
||||
#if defined(CONFIG_BOARD_BANANAPI_M4BERRY) || defined(CONFIG_BOARD_BANANAPI_M4ZERO)
|
||||
machine_name = name;
|
||||
if (!strcmp(machine_name, "Bananapi BPI-M4Berry")) {
|
||||
system_rev = 0x0002;
|
||||
} else if (!strcmp(machine_name, "Bananapi BPI-M4Zero")) {
|
||||
system_rev = 0x0003;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void __init request_standard_resources(void)
|
||||
|
||||
@ -1221,7 +1221,7 @@ out:
|
||||
|
||||
static void geth_check_addr(struct net_device *ndev, unsigned char *mac)
|
||||
{
|
||||
int i, j;
|
||||
int i;
|
||||
char *p = mac;
|
||||
struct geth_priv *priv = netdev_priv(ndev);
|
||||
|
||||
|
||||
@ -84,7 +84,7 @@ static int link_mode_8614[4] = {0}; //0: no link; 1: utp; 32: fiber. traced that
|
||||
static unsigned int yt_mport_base_phy_addr = 0xff; //0xff: invalid; for 8618
|
||||
static unsigned int yt_mport_base_phy_addr_8614 = 0xff; //0xff: invalid;
|
||||
|
||||
static int yt8511_config_out_125m(struct mii_bus *bus, int phy_id);
|
||||
int yt8511_config_out_125m(struct mii_bus *bus, int phy_id);
|
||||
static int ytphy_mii_wr_ext(struct mii_bus *bus, int phy_id, u32 regnum, u16 val);
|
||||
|
||||
static int phy_yt8531_led_fixup(struct mii_bus *bus, int addr)
|
||||
|
||||
@ -91,4 +91,9 @@ int sunxi_soc_is_secure(void);
|
||||
s32 sunxi_get_platform(s8 *buf, s32 size);
|
||||
s32 sunxi_efuse_readn(s8 *key_name, void *buf, u32 n);
|
||||
|
||||
#if defined(CONFIG_BOARD_BANANAPI_M4BERRY) || defined(CONFIG_BOARD_BANANAPI_M4ZERO)
|
||||
extern const char *machine_name;
|
||||
extern unsigned int system_rev;
|
||||
#endif
|
||||
|
||||
#endif /* __SUNXI_MACH_SUNXI_CHIP_H */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user