summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap/include/mach/debug_ll.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2023-02-28 10:05:32 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2023-03-06 14:10:44 +0100
commitfd80779b3b55a318a3ef0725d14449fd2b683d81 (patch)
treef67c27f4588263824d90f703244ceb1dd85adfe3 /arch/arm/mach-omap/include/mach/debug_ll.h
parentb24a05ab83eac617654d48c5b60ad70177bf4ab9 (diff)
downloadbarebox-fd80779b3b55a318a3ef0725d14449fd2b683d81.tar.gz
barebox-fd80779b3b55a318a3ef0725d14449fd2b683d81.tar.xz
ARM: omap: Move mach header files to include/mach/omap
Currently arch specific headers can be included with longer possible as there won't be a single mach anymore. Move all omap specific header files to include/mach/omap/ to prepare for multi-arch support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-omap/include/mach/debug_ll.h')
-rw-r--r--arch/arm/mach-omap/include/mach/debug_ll.h80
1 files changed, 0 insertions, 80 deletions
diff --git a/arch/arm/mach-omap/include/mach/debug_ll.h b/arch/arm/mach-omap/include/mach/debug_ll.h
deleted file mode 100644
index 25ddd485be..0000000000
--- a/arch/arm/mach-omap/include/mach/debug_ll.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2011
- * Author: Jan Weitzel <j.weitzel@phytec.de>
- * based on arch/arm/mach-versatile/include/mach/debug_ll.h
- *
- * barebox is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * barebox is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef __MACH_DEBUG_LL_H__
-#define __MACH_DEBUG_LL_H__
-
-#include <io.h>
-#include <mach/omap3-silicon.h>
-#include <mach/omap4-silicon.h>
-#include <mach/am33xx-silicon.h>
-
-#define LSR_THRE 0x20 /* Xmit holding register empty */
-#define LCR_BKSE 0x80 /* Bank select enable */
-#define LSR (5 << 2)
-#define THR (0 << 2)
-#define DLL (0 << 2)
-#define IER (1 << 2)
-#define DLM (1 << 2)
-#define FCR (2 << 2)
-#define LCR (3 << 2)
-#define MCR (4 << 2)
-#define MDR (8 << 2)
-
-static inline void omap_uart_lowlevel_init(void __iomem *base)
-{
- writeb(0x00, base + LCR);
- writeb(0x00, base + IER);
- writeb(0x07, base + MDR);
- writeb(LCR_BKSE, base + LCR);
- writeb(26, base + DLL); /* 115200 */
- writeb(0, base + DLM);
- writeb(0x03, base + LCR);
- writeb(0x03, base + MCR);
- writeb(0x07, base + FCR);
- writeb(0x00, base + MDR);
-}
-
-#ifdef CONFIG_DEBUG_LL
-
-#ifdef CONFIG_DEBUG_OMAP3_UART
-#define OMAP_DEBUG_SOC OMAP3
-#elif defined CONFIG_DEBUG_OMAP4_UART
-#define OMAP_DEBUG_SOC OMAP44XX
-#elif defined CONFIG_DEBUG_AM33XX_UART
-#define OMAP_DEBUG_SOC AM33XX
-#else
-#error "unknown OMAP debug uart soc type"
-#endif
-
-#define __OMAP_UART_BASE(soc, num) soc##_UART##num##_BASE
-#define OMAP_UART_BASE(soc, num) __OMAP_UART_BASE(soc, num)
-
-static inline void PUTC_LL(char c)
-{
- void __iomem *base = (void *)OMAP_UART_BASE(OMAP_DEBUG_SOC,
- CONFIG_DEBUG_OMAP_UART_PORT);
-
- /* Wait until there is space in the FIFO */
- while ((readb(base + LSR) & LSR_THRE) == 0);
- /* Send the character */
- writeb(c, base + THR);
- /* Wait to make sure it hits the line, in case we die too soon. */
- while ((readb(base + LSR) & LSR_THRE) == 0);
-}
-#endif
-
-#endif