[RFC PATCHv4 1/6] arm: TI-Nspire platform code

From
Arnd Bergmann <arnd@arndb.de>
Date
2013-05-26 20:46:47
Also in
lkml
Reply to
Daniel Tang, 2013-05-25
On Saturday 25 May 2013, Daniel Tang wrote:
quoted hunk ↗ jump to hunk
+static struct map_desc nspire_io_desc[] __initdata = {
+	{
+		.virtual	=  NSPIRE_EARLY_UART_VIRT_BASE,
+		.pfn		= __phys_to_pfn(NSPIRE_EARLY_UART_PHYS_BASE),
+		.length		= SZ_4K,
+		.type		= MT_DEVICE
+	},
You  can remove this now and call debug_ll_io_init() instead, so you can
remove the duplicate definitions of the base addresses.
quoted hunk ↗ jump to hunk
+	{
+		.virtual	=  NSPIRE_PWR_VIRT_BASE,
+		.pfn		= __phys_to_pfn(NSPIRE_PWR_PHYS_BASE),
+		.length		= SZ_4K,
+		.type		= MT_DEVICE
+	}
+};
And I think this one can be replaced with a call to of_iomap:
quoted hunk ↗ jump to hunk
+static void __init nspire_early_init(void)
+{
+	void __iomem *pwr = IOMEM(NSPIRE_PWR_VIRT_BASE);
+
+	/* Re-enable bus access to all peripherals */
+	writel(0, pwr + NSPIRE_PWR_BUS_DISABLE1);
+	writel(0, pwr + NSPIRE_PWR_BUS_DISABLE2);
+
+	pr_info("Re-enabled bus access to all peripherals\n");
+}
Since it seems to be used only in this one function.
quoted hunk ↗ jump to hunk
+DT_MACHINE_START(NSPIRE, "TI-NSPIRE")
+	.map_io		= nspire_map_io,
+	.init_irq	= irqchip_init,
+	.init_time	= nspire_init_time,
+	.init_machine	= nspire_init,
+	.init_early	= nspire_early_init,
+	.dt_compat	= nspire_dt_match,
+	.restart	= nspire_restart,
+MACHINE_END
The reference to irqchip_init is now the default, so you can drop that too.
nspire_init_time is still needed right now, but I'd like to initialize the
clocks automatically soon, so that will go away in the future.

Please reorder the other callbacks in call order, same as the structure
definition.

	Arnd
Thread (28 messages) 28 messages, 9 authors, last reply 2013-05-31
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help