diff options
-rw-r--r-- | arch/powerpc/platforms/iseries/setup.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c index 127af3b0ba82..8fe7237bc46f 100644 --- a/arch/powerpc/platforms/iseries/setup.c +++ b/arch/powerpc/platforms/iseries/setup.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <asm/iseries/hv_call_xm.h> | 50 | #include <asm/iseries/hv_call_xm.h> |
51 | #include <asm/iseries/it_lp_queue.h> | 51 | #include <asm/iseries/it_lp_queue.h> |
52 | #include <asm/iseries/mf.h> | 52 | #include <asm/iseries/mf.h> |
53 | #include <asm/iseries/it_exp_vpd_panel.h> | ||
53 | #include <asm/iseries/hv_lp_event.h> | 54 | #include <asm/iseries/hv_lp_event.h> |
54 | #include <asm/iseries/lpar_map.h> | 55 | #include <asm/iseries/lpar_map.h> |
55 | #include <asm/udbg.h> | 56 | #include <asm/udbg.h> |
@@ -888,6 +889,24 @@ void dt_cpus(struct iseries_flat_dt *dt) | |||
888 | dt_end_node(dt); | 889 | dt_end_node(dt); |
889 | } | 890 | } |
890 | 891 | ||
892 | void dt_model(struct iseries_flat_dt *dt) | ||
893 | { | ||
894 | char buf[16] = "IBM,"; | ||
895 | |||
896 | /* "IBM," + mfgId[2:3] + systemSerial[1:5] */ | ||
897 | strne2a(buf + 4, xItExtVpdPanel.mfgID + 2, 2); | ||
898 | strne2a(buf + 6, xItExtVpdPanel.systemSerial + 1, 5); | ||
899 | buf[11] = '\0'; | ||
900 | dt_prop_str(dt, "system-id", buf); | ||
901 | |||
902 | /* "IBM," + machineType[0:4] */ | ||
903 | strne2a(buf + 4, xItExtVpdPanel.machineType, 4); | ||
904 | buf[8] = '\0'; | ||
905 | dt_prop_str(dt, "model", buf); | ||
906 | |||
907 | dt_prop_str(dt, "compatible", "IBM,iSeries"); | ||
908 | } | ||
909 | |||
891 | void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) | 910 | void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) |
892 | { | 911 | { |
893 | u64 tmp[2]; | 912 | u64 tmp[2]; |
@@ -898,6 +917,7 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size) | |||
898 | 917 | ||
899 | dt_prop_u32(dt, "#address-cells", 2); | 918 | dt_prop_u32(dt, "#address-cells", 2); |
900 | dt_prop_u32(dt, "#size-cells", 2); | 919 | dt_prop_u32(dt, "#size-cells", 2); |
920 | dt_model(dt); | ||
901 | 921 | ||
902 | /* /memory */ | 922 | /* /memory */ |
903 | dt_start_node(dt, "memory@0"); | 923 | dt_start_node(dt, "memory@0"); |