Samsung mach/soc changes for v4.15
1. Cleanups for s3c24xx and s3c64xx (memory allocation printks, code style). 2. Remove of Exynos4212 related dead code (no more support for this SoC). -----BEGIN PGP SIGNATURE----- iQIcBAABCAAGBQJZ4xDZAAoJEME3ZuaGi4PXWx4P/iEsO7Cbcc/rV8HjCjwIZY2h VomlTxxcL0P0d+bkDrkAl2f2BHl2rhfC3D4PoBNjFMeyYficqfgjRO4Zrhj1jL0g 9JxiqcLVVpnn0wWgd5B3UPiLqSWGXPB7PCsdA/P/TjBonu+jmFbFtSRZtcFdLuIH uVKVnFLSzcnO4a//F5/Hf6OGbH4W7R69eIu2Ft7isjmFlSJOV4kAfOCNqlCUhaOm zhVai9StZpkDFfCKA4ksGdQITuMqJRldlklKfKJtm9AO8Njc96wMu/xvbtR+NzS6 eWWgsCnrQsh35O9qK2fiyQPWa+Nm0Z8QyfTz2Td3wtnYpOOD8qEghow+5dQfhucl CP1nqwW0reK/ieq6qyR1tyJR/fHSmBQJLNGAfDf9n3EIoAIoo2ExxpE+XvdsP0rr GsN+PMFMOCSZl82UP3O9zN6QwjTRf9a3In3JaxJlAkmQe984d4dXzb84RCfKspFV 0jLPypiuRGBnWey8QHzdRPtdXyCcZdUt0+f6TjtsIf0SHPu0p7Qu2S9v/kiEyVDp uOytpuLQup0/x35oYmEEKUwdGJefUehZm/rEKFYVQywn46YK1rQhvyJP3bDjW8Yy eQK8t2kTqhmMGycEW+1374LeA35pMXUaydAefBJXjqMApxMwUvsC4cd35ABfTONm FhQQ5KHK0O9WGC4GKzgI =vGPQ -----END PGP SIGNATURE----- Merge tag 'samsung-soc-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/soc Pull "Samsung mach/soc changes for v4.15" from Krzysztof Kozłowski: 1. Cleanups for s3c24xx and s3c64xx (memory allocation printks, code style). 2. Remove of Exynos4212 related dead code (no more support for this SoC). * tag 'samsung-soc-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: EXYNOS: Remove Exynos4212 related dead code ARM: SAMSUNG: Simplify size used for kzalloc ARM: SAMSUNG: Remove printk for failed memory allocation ARM: s3c64xx: Delete an unnecessary return statement in samsung_bl_set ARM: s3c64xx: Remove printk for failed memory allocation in samsung_bl_set ARM: s3c2410: Fix typos in a comments ARM: s3c24xx: Simplify size used for kzalloc in iotiming get ARM: s3c24xx: Remove printk for failed memory allocation in iotiming get
This commit is contained in:
commit
818f62ab28
|
@ -85,11 +85,6 @@ config CPU_EXYNOS4210
|
|||
default y
|
||||
depends on ARCH_EXYNOS4
|
||||
|
||||
config SOC_EXYNOS4212
|
||||
bool "SAMSUNG EXYNOS4212"
|
||||
default y
|
||||
depends on ARCH_EXYNOS4
|
||||
|
||||
config SOC_EXYNOS4412
|
||||
bool "SAMSUNG EXYNOS4412"
|
||||
default y
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#define EXYNOS3_SOC_MASK 0xFFFFF000
|
||||
|
||||
#define EXYNOS4210_CPU_ID 0x43210000
|
||||
#define EXYNOS4212_CPU_ID 0x43220000
|
||||
#define EXYNOS4412_CPU_ID 0xE4412200
|
||||
#define EXYNOS4_CPU_MASK 0xFFFE0000
|
||||
|
||||
|
@ -39,7 +38,6 @@ static inline int is_samsung_##name(void) \
|
|||
|
||||
IS_SAMSUNG_CPU(exynos3250, EXYNOS3250_SOC_ID, EXYNOS3_SOC_MASK)
|
||||
IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
|
||||
IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_MASK)
|
||||
IS_SAMSUNG_CPU(exynos4412, EXYNOS4412_CPU_ID, EXYNOS4_CPU_MASK)
|
||||
IS_SAMSUNG_CPU(exynos5250, EXYNOS5250_SOC_ID, EXYNOS5_SOC_MASK)
|
||||
IS_SAMSUNG_CPU(exynos5410, EXYNOS5410_SOC_ID, EXYNOS5_SOC_MASK)
|
||||
|
@ -59,12 +57,6 @@ IS_SAMSUNG_CPU(exynos5800, EXYNOS5800_SOC_ID, EXYNOS5_SOC_MASK)
|
|||
# define soc_is_exynos4210() 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SOC_EXYNOS4212)
|
||||
# define soc_is_exynos4212() is_samsung_exynos4212()
|
||||
#else
|
||||
# define soc_is_exynos4212() 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SOC_EXYNOS4412)
|
||||
# define soc_is_exynos4412() is_samsung_exynos4412()
|
||||
#else
|
||||
|
@ -105,8 +97,7 @@ IS_SAMSUNG_CPU(exynos5800, EXYNOS5800_SOC_ID, EXYNOS5_SOC_MASK)
|
|||
# define soc_is_exynos5800() 0
|
||||
#endif
|
||||
|
||||
#define soc_is_exynos4() (soc_is_exynos4210() || soc_is_exynos4212() || \
|
||||
soc_is_exynos4412())
|
||||
#define soc_is_exynos4() (soc_is_exynos4210() || soc_is_exynos4412())
|
||||
#define soc_is_exynos5() (soc_is_exynos5250() || soc_is_exynos5410() || \
|
||||
soc_is_exynos5420() || soc_is_exynos5800())
|
||||
|
||||
|
|
|
@ -195,7 +195,6 @@ static void __init exynos_dt_machine_init(void)
|
|||
exynos_cpuidle.dev.platform_data = &cpuidle_coupled_exynos_data;
|
||||
#endif
|
||||
if (of_machine_is_compatible("samsung,exynos4210") ||
|
||||
of_machine_is_compatible("samsung,exynos4212") ||
|
||||
(of_machine_is_compatible("samsung,exynos4412") &&
|
||||
of_machine_is_compatible("samsung,trats2")) ||
|
||||
of_machine_is_compatible("samsung,exynos3250") ||
|
||||
|
@ -208,7 +207,6 @@ static char const *const exynos_dt_compat[] __initconst = {
|
|||
"samsung,exynos3250",
|
||||
"samsung,exynos4",
|
||||
"samsung,exynos4210",
|
||||
"samsung,exynos4212",
|
||||
"samsung,exynos4412",
|
||||
"samsung,exynos5",
|
||||
"samsung,exynos5250",
|
||||
|
|
|
@ -70,12 +70,7 @@ static int exynos_cpu_boot(int cpu)
|
|||
|
||||
/*
|
||||
* The second parameter of SMC_CMD_CPU1BOOT command means CPU id.
|
||||
* But, Exynos4212 has only one secondary CPU so second parameter
|
||||
* isn't used for informing secure firmware about CPU id.
|
||||
*/
|
||||
if (soc_is_exynos4212())
|
||||
cpu = 0;
|
||||
|
||||
exynos_smc(SMC_CMD_CPU1BOOT, cpu, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -167,8 +167,7 @@ void exynos_enter_aftr(void)
|
|||
|
||||
exynos_pm_central_suspend();
|
||||
|
||||
if (of_machine_is_compatible("samsung,exynos4212") ||
|
||||
of_machine_is_compatible("samsung,exynos4412")) {
|
||||
if (of_machine_is_compatible("samsung,exynos4412")) {
|
||||
/* Setting SEQ_OPTION register */
|
||||
pmu_raw_writel(S5P_USE_STANDBY_WFI0 | S5P_USE_STANDBY_WFE0,
|
||||
S5P_CENTRAL_SEQ_OPTION);
|
||||
|
|
|
@ -225,7 +225,6 @@ static int __init exynos_pmu_irq_init(struct device_node *node,
|
|||
|
||||
EXYNOS_PMU_IRQ(exynos3250_pmu_irq, "samsung,exynos3250-pmu");
|
||||
EXYNOS_PMU_IRQ(exynos4210_pmu_irq, "samsung,exynos4210-pmu");
|
||||
EXYNOS_PMU_IRQ(exynos4212_pmu_irq, "samsung,exynos4212-pmu");
|
||||
EXYNOS_PMU_IRQ(exynos4412_pmu_irq, "samsung,exynos4412-pmu");
|
||||
EXYNOS_PMU_IRQ(exynos5250_pmu_irq, "samsung,exynos5250-pmu");
|
||||
EXYNOS_PMU_IRQ(exynos5420_pmu_irq, "samsung,exynos5420-pmu");
|
||||
|
@ -616,9 +615,6 @@ static const struct of_device_id exynos_pmu_of_device_ids[] __initconst = {
|
|||
}, {
|
||||
.compatible = "samsung,exynos4210-pmu",
|
||||
.data = &exynos4_pm_data,
|
||||
}, {
|
||||
.compatible = "samsung,exynos4212-pmu",
|
||||
.data = &exynos4_pm_data,
|
||||
}, {
|
||||
.compatible = "samsung,exynos4412-pmu",
|
||||
.data = &exynos4_pm_data,
|
||||
|
|
|
@ -206,7 +206,7 @@ static int calc_tacc(unsigned int cyc, int nwait_en,
|
|||
}
|
||||
|
||||
/**
|
||||
* s3c2410_calc_bank - calculate bank timing infromation
|
||||
* s3c2410_calc_bank - calculate bank timing information
|
||||
* @cfg: The configuration we need to calculate for.
|
||||
* @bt: The bank timing information.
|
||||
*
|
||||
|
@ -453,11 +453,9 @@ int s3c2410_iotiming_get(struct s3c_cpufreq_config *cfg,
|
|||
s3c_freq_iodbg("%s: bank %d: con %08lx\n",
|
||||
__func__, bank, bankcon);
|
||||
|
||||
bt = kzalloc(sizeof(struct s3c2410_iobank_timing), GFP_KERNEL);
|
||||
if (!bt) {
|
||||
printk(KERN_ERR "%s: no memory for bank\n", __func__);
|
||||
bt = kzalloc(sizeof(*bt), GFP_KERNEL);
|
||||
if (!bt)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* find out in nWait is enabled for bank. */
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#define print_ns(x) ((x) / 10), ((x) % 10)
|
||||
|
||||
/**
|
||||
* s3c2412_print_timing - print timing infromation via printk.
|
||||
* s3c2412_print_timing - print timing information via printk.
|
||||
* @pfx: The prefix to print each line with.
|
||||
* @iot: The IO timing information
|
||||
*/
|
||||
|
@ -242,11 +242,9 @@ int s3c2412_iotiming_get(struct s3c_cpufreq_config *cfg,
|
|||
if (!bank_is_io(bank, bankcfg))
|
||||
continue;
|
||||
|
||||
bt = kzalloc(sizeof(struct s3c2412_iobank_timing), GFP_KERNEL);
|
||||
if (!bt) {
|
||||
printk(KERN_ERR "%s: no memory for bank\n", __func__);
|
||||
bt = kzalloc(sizeof(*bt), GFP_KERNEL);
|
||||
if (!bt)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
timings->bank[bank].io_2412 = bt;
|
||||
s3c2412_iotiming_getbank(cfg, bt, bank);
|
||||
|
|
|
@ -94,17 +94,14 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
|
|||
|
||||
samsung_bl_device = kmemdup(&samsung_dfl_bl_device,
|
||||
sizeof(struct platform_device), GFP_KERNEL);
|
||||
if (!samsung_bl_device) {
|
||||
printk(KERN_ERR "%s: no memory for platform dev\n", __func__);
|
||||
if (!samsung_bl_device)
|
||||
return;
|
||||
}
|
||||
|
||||
samsung_bl_drvdata = kmemdup(&samsung_dfl_bl_data,
|
||||
sizeof(samsung_dfl_bl_data), GFP_KERNEL);
|
||||
if (!samsung_bl_drvdata) {
|
||||
printk(KERN_ERR "%s: no memory for platform dev\n", __func__);
|
||||
if (!samsung_bl_drvdata)
|
||||
goto err_data;
|
||||
}
|
||||
|
||||
samsung_bl_device->dev.platform_data = &samsung_bl_drvdata->plat_data;
|
||||
samsung_bl_drvdata->gpio_info = gpio_info;
|
||||
samsung_bl_data = &samsung_bl_drvdata->plat_data;
|
||||
|
@ -144,5 +141,4 @@ err_plat_reg2:
|
|||
kfree(samsung_bl_data);
|
||||
err_data:
|
||||
kfree(samsung_bl_device);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -238,11 +238,9 @@ struct s3c_adc_client *s3c_adc_register(struct platform_device *pdev,
|
|||
if (!pdev)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
client = kzalloc(sizeof(struct s3c_adc_client), GFP_KERNEL);
|
||||
if (!client) {
|
||||
dev_err(&pdev->dev, "no memory for adc client\n");
|
||||
client = kzalloc(sizeof(*client), GFP_KERNEL);
|
||||
if (!client)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
client->pdev = pdev;
|
||||
client->is_ts = is_ts;
|
||||
|
@ -344,11 +342,9 @@ static int s3c_adc_probe(struct platform_device *pdev)
|
|||
int ret;
|
||||
unsigned tmp;
|
||||
|
||||
adc = devm_kzalloc(dev, sizeof(struct adc_device), GFP_KERNEL);
|
||||
if (adc == NULL) {
|
||||
dev_err(dev, "failed to allocate adc_device\n");
|
||||
adc = devm_kzalloc(dev, sizeof(*adc), GFP_KERNEL);
|
||||
if (!adc)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
spin_lock_init(&adc->lock);
|
||||
|
||||
|
|
|
@ -339,8 +339,7 @@ void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd)
|
|||
pd->bus_num = 0;
|
||||
}
|
||||
|
||||
npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
||||
&s3c_device_i2c0);
|
||||
npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_i2c0);
|
||||
|
||||
if (!npd->cfg_gpio)
|
||||
npd->cfg_gpio = s3c_i2c0_cfg_gpio;
|
||||
|
@ -368,8 +367,7 @@ void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd)
|
|||
pd->bus_num = 1;
|
||||
}
|
||||
|
||||
npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
||||
&s3c_device_i2c1);
|
||||
npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_i2c1);
|
||||
|
||||
if (!npd->cfg_gpio)
|
||||
npd->cfg_gpio = s3c_i2c1_cfg_gpio;
|
||||
|
@ -398,8 +396,7 @@ void __init s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *pd)
|
|||
pd->bus_num = 2;
|
||||
}
|
||||
|
||||
npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
||||
&s3c_device_i2c2);
|
||||
npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_i2c2);
|
||||
|
||||
if (!npd->cfg_gpio)
|
||||
npd->cfg_gpio = s3c_i2c2_cfg_gpio;
|
||||
|
@ -428,8 +425,7 @@ void __init s3c_i2c3_set_platdata(struct s3c2410_platform_i2c *pd)
|
|||
pd->bus_num = 3;
|
||||
}
|
||||
|
||||
npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
||||
&s3c_device_i2c3);
|
||||
npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_i2c3);
|
||||
|
||||
if (!npd->cfg_gpio)
|
||||
npd->cfg_gpio = s3c_i2c3_cfg_gpio;
|
||||
|
@ -458,8 +454,7 @@ void __init s3c_i2c4_set_platdata(struct s3c2410_platform_i2c *pd)
|
|||
pd->bus_num = 4;
|
||||
}
|
||||
|
||||
npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
||||
&s3c_device_i2c4);
|
||||
npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_i2c4);
|
||||
|
||||
if (!npd->cfg_gpio)
|
||||
npd->cfg_gpio = s3c_i2c4_cfg_gpio;
|
||||
|
@ -488,8 +483,7 @@ void __init s3c_i2c5_set_platdata(struct s3c2410_platform_i2c *pd)
|
|||
pd->bus_num = 5;
|
||||
}
|
||||
|
||||
npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
||||
&s3c_device_i2c5);
|
||||
npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_i2c5);
|
||||
|
||||
if (!npd->cfg_gpio)
|
||||
npd->cfg_gpio = s3c_i2c5_cfg_gpio;
|
||||
|
@ -518,8 +512,7 @@ void __init s3c_i2c6_set_platdata(struct s3c2410_platform_i2c *pd)
|
|||
pd->bus_num = 6;
|
||||
}
|
||||
|
||||
npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
||||
&s3c_device_i2c6);
|
||||
npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_i2c6);
|
||||
|
||||
if (!npd->cfg_gpio)
|
||||
npd->cfg_gpio = s3c_i2c6_cfg_gpio;
|
||||
|
@ -548,8 +541,7 @@ void __init s3c_i2c7_set_platdata(struct s3c2410_platform_i2c *pd)
|
|||
pd->bus_num = 7;
|
||||
}
|
||||
|
||||
npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
|
||||
&s3c_device_i2c7);
|
||||
npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_i2c7);
|
||||
|
||||
if (!npd->cfg_gpio)
|
||||
npd->cfg_gpio = s3c_i2c7_cfg_gpio;
|
||||
|
@ -615,8 +607,7 @@ void __init samsung_keypad_set_platdata(struct samsung_keypad_platdata *pd)
|
|||
{
|
||||
struct samsung_keypad_platdata *npd;
|
||||
|
||||
npd = s3c_set_platdata(pd, sizeof(struct samsung_keypad_platdata),
|
||||
&samsung_device_keypad);
|
||||
npd = s3c_set_platdata(pd, sizeof(*npd), &samsung_device_keypad);
|
||||
|
||||
if (!npd->cfg_gpio)
|
||||
npd->cfg_gpio = samsung_keypad_cfg_gpio;
|
||||
|
@ -721,8 +712,7 @@ void __init s3c_nand_set_platdata(struct s3c2410_platform_nand *nand)
|
|||
* time then there is little chance the system is going to run.
|
||||
*/
|
||||
|
||||
npd = s3c_set_platdata(nand, sizeof(struct s3c2410_platform_nand),
|
||||
&s3c_device_nand);
|
||||
npd = s3c_set_platdata(nand, sizeof(*npd), &s3c_device_nand);
|
||||
if (!npd)
|
||||
return;
|
||||
|
||||
|
@ -1022,8 +1012,7 @@ void __init dwc2_hsotg_set_platdata(struct dwc2_hsotg_plat *pd)
|
|||
{
|
||||
struct dwc2_hsotg_plat *npd;
|
||||
|
||||
npd = s3c_set_platdata(pd, sizeof(struct dwc2_hsotg_plat),
|
||||
&s3c_device_usb_hsotg);
|
||||
npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_usb_hsotg);
|
||||
|
||||
if (!npd->phy_init)
|
||||
npd->phy_init = s5p_usb_phy_init;
|
||||
|
|
|
@ -29,10 +29,8 @@ void __init *s3c_set_platdata(void *pd, size_t pdsize,
|
|||
}
|
||||
|
||||
npd = kmemdup(pd, pdsize, GFP_KERNEL);
|
||||
if (!npd) {
|
||||
printk(KERN_ERR "%s: cannot clone platform data\n", pdev->name);
|
||||
if (!npd)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pdev->dev.platform_data = npd;
|
||||
return npd;
|
||||
|
|
Loading…
Reference in New Issue