mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-05 04:36:13 +02:00
m68k: mcf5441x: create stub to use imx drivers
Some NXP imx hardware ip module as the esdhc controller are exactly the same in some new ColdFire cpus. For the specific case, mcf5441x needs to use the existing fsl_esdhc_imx.c driver for the esdhc device. Create a stub to be able to use NXP "imx" serie drivers as the fsl_esdhc_imx in the ColdFire architecture. Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
This commit is contained in:
parent
b17db4fadc
commit
07d824e5bb
@ -62,6 +62,7 @@ config MCF5441x
|
||||
select DM
|
||||
select DM_SERIAL
|
||||
select ARCH_COLDFIRE
|
||||
select CREATE_ARCH_SYMLINK
|
||||
bool
|
||||
|
||||
config M680x0
|
||||
|
||||
19
arch/m68k/include/asm/arch-mcf5445x/clock.h
Normal file
19
arch/m68k/include/asm/arch-mcf5445x/clock.h
Normal file
@ -0,0 +1,19 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0+ */
|
||||
/*
|
||||
* ColdFire clock support
|
||||
*
|
||||
* Copyright 2026 Kernelspace.
|
||||
* Angelo Dureghello <angelo@kernel-space.org>
|
||||
*/
|
||||
|
||||
#ifndef __CLOCK_H
|
||||
#define __CLOCK_H
|
||||
|
||||
/* Stub to use fsl/nxp drivers. */
|
||||
enum mxc_clock {
|
||||
MXC_ESDHC_CLK,
|
||||
};
|
||||
|
||||
int mxc_get_clock(enum mxc_clock clk);
|
||||
|
||||
#endif /* __CLOCK_H */
|
||||
@ -9,3 +9,4 @@ lib-$(CONFIG_USE_PRIVATE_LIBGCC) += lshrdi3.o muldi3.o ashldi3.o ashrdi3.o
|
||||
|
||||
obj-$(CONFIG_CMD_BOOTM) += bootm.o
|
||||
obj-$(CONFIG_ARCH_COLDFIRE) += cache.o interrupts.o time.o traps.o bdinfo.o fec.o
|
||||
obj-$(CONFIG_MCF5441x) += clock.o
|
||||
|
||||
23
arch/m68k/lib/clock.c
Normal file
23
arch/m68k/lib/clock.c
Normal file
@ -0,0 +1,23 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* (C) Copyright 2026 Kernelspace
|
||||
* Angelo Dureghello <angelo@kernel-space.org>
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <asm/arch/clock.h>
|
||||
#include <asm/global_data.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
/*
|
||||
* Stub to use existing nxp/fsl drivers.
|
||||
*/
|
||||
int mxc_get_clock(enum mxc_clock clk)
|
||||
{
|
||||
if (clk == MXC_ESDHC_CLK)
|
||||
return gd->arch.sdhc_clk;
|
||||
|
||||
printf("Unsupported MXC CLK: %d\n", clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user