| .. | .. |
|---|
| 57 | 57 | } |
|---|
| 58 | 58 | |
|---|
| 59 | 59 | cell = nvmem_cell_get(dev, "id"); |
|---|
| 60 | | - if (IS_ERR(cell)) { |
|---|
| 61 | | - dev_err(dev, "failed to get id cell: %ld\n", PTR_ERR(cell)); |
|---|
| 62 | | - if (PTR_ERR(cell) == -EPROBE_DEFER) |
|---|
| 63 | | - return PTR_ERR(cell); |
|---|
| 64 | | - return PTR_ERR(cell); |
|---|
| 65 | | - } |
|---|
| 60 | + if (IS_ERR(cell)) |
|---|
| 61 | + return dev_err_probe(dev, PTR_ERR(cell), "failed to get id cell\n"); |
|---|
| 62 | + |
|---|
| 66 | 63 | efuse_buf = nvmem_cell_read(cell, &len); |
|---|
| 67 | 64 | nvmem_cell_put(cell); |
|---|
| 68 | 65 | if (IS_ERR(efuse_buf)) |
|---|
| .. | .. |
|---|
| 214 | 211 | |
|---|
| 215 | 212 | static void rk3528_init(void) |
|---|
| 216 | 213 | { |
|---|
| 217 | | - rockchip_soc_id = ROCKCHIP_SOC_RK3528; |
|---|
| 214 | + if (of_machine_is_compatible("rockchip,rk3528")) |
|---|
| 215 | + rockchip_soc_id = ROCKCHIP_SOC_RK3528; |
|---|
| 216 | + else if (of_machine_is_compatible("rockchip,rk3528a")) |
|---|
| 217 | + rockchip_soc_id = ROCKCHIP_SOC_RK3528A; |
|---|
| 218 | 218 | } |
|---|
| 219 | 219 | |
|---|
| 220 | 220 | #define RK356X_PMU_GRF_PHYS 0xfdc20000 |
|---|
| .. | .. |
|---|
| 235 | 235 | static void rk3566_init(void) |
|---|
| 236 | 236 | { |
|---|
| 237 | 237 | rockchip_soc_id = ROCKCHIP_SOC_RK3566; |
|---|
| 238 | + rk356x_set_cpu_version(); |
|---|
| 239 | +} |
|---|
| 240 | + |
|---|
| 241 | +static void rk3567_init(void) |
|---|
| 242 | +{ |
|---|
| 243 | + rockchip_soc_id = ROCKCHIP_SOC_RK3567; |
|---|
| 238 | 244 | rk356x_set_cpu_version(); |
|---|
| 239 | 245 | } |
|---|
| 240 | 246 | |
|---|
| .. | .. |
|---|
| 270 | 276 | rk3528_init(); |
|---|
| 271 | 277 | } else if (cpu_is_rk3566()) { |
|---|
| 272 | 278 | rk3566_init(); |
|---|
| 279 | + } else if (cpu_is_rk3567()) { |
|---|
| 280 | + rk3567_init(); |
|---|
| 273 | 281 | } else if (cpu_is_rk3568()) { |
|---|
| 274 | 282 | rk3568_init(); |
|---|
| 275 | 283 | } else if (cpu_is_px30()) { |
|---|