mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-03 21:48:15 +00:00 
			
		
		
		
	This commit converts UniPhier on-chip serial driver to driver model. Since UniPhier SoCs do not have Device Tree support, some board files should be added under arch/arm/cpu/armv7/uniphier/ph1-*/ directories. (Device Tree support for UniPhier platform is still under way.) Now the base address and master clock frequency are passed from platform data, so CONFIG_SYS_UNIPHIER_SERIAL_BASE* and CONFIG_SYS_UNIPHIER_UART_CLK should be removed. Tested on UniPhier PH1-LD4 ref board. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
		
			
				
	
	
		
			25 lines
		
	
	
		
			576 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			576 B
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * Copyright (C) 2014 Panasonic Corporation
 | 
						|
 *   Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
 | 
						|
 *
 | 
						|
 * SPDX-License-Identifier:	GPL-2.0+
 | 
						|
 */
 | 
						|
 | 
						|
#ifndef ARCH_PLATDEVICE_H
 | 
						|
#define ARCH_PLATDEVICE_H
 | 
						|
 | 
						|
#include <dm/platdata.h>
 | 
						|
#include <dm/platform_data/serial-uniphier.h>
 | 
						|
 | 
						|
#define SERIAL_DEVICE(n, ba, clk)					\
 | 
						|
static struct uniphier_serial_platform_data serial_device##n = {	\
 | 
						|
	.base = ba,							\
 | 
						|
	.uartclk = clk							\
 | 
						|
};									\
 | 
						|
U_BOOT_DEVICE(serial##n) = {						\
 | 
						|
	.name = DRIVER_NAME,						\
 | 
						|
	.platdata = &serial_device##n					\
 | 
						|
};
 | 
						|
 | 
						|
#endif /* ARCH_PLATDEVICE_H */
 |