summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0f81554)
raw | patch | inline | side by side (parent: 0f81554)
author | Bill Mills <wmills@ti.com> | |
Wed, 23 Nov 2011 22:07:30 +0000 (17:07 -0500) | ||
committer | Bill Mills <wmills@ti.com> | |
Wed, 23 Nov 2011 22:11:08 +0000 (17:11 -0500) |
Recent changes broke c64x platforms because they assume C66 uart.
This commit seperates UART user API from implementation
It also adds a "null" uart for platforms w/o a UART
This null UART is used on all c64x platforms for now
Signed-off-by: Bill Mills <wmills@ti.com>
This commit seperates UART user API from implementation
It also adds a "null" uart for platforms w/o a UART
This null UART is used on all c64x platforms for now
Signed-off-by: Bill Mills <wmills@ti.com>
13 files changed:
src/device/c64x/make/makefile | patch | blob | history | |
src/device/c66x/c66x.c | patch | blob | history | |
src/hw/c64x/make/makefile | patch | blob | history | |
src/hw/uart/c66x_uart/evmc66x_uart.h | patch | blob | history | |
src/hw/uart/null_uart/null_uart.c | [new file with mode: 0644] | patch | blob |
src/hw/uart/uart.h | [new file with mode: 0644] | patch | blob |
src/main/c64x/make/makefile | patch | blob | history | |
src/main/iblmain.c | patch | blob | history | |
src/make/ibl_c6455/ibl_objs_template.inc | patch | blob | history | |
src/make/ibl_c6457/ibl_objs_template.inc | patch | blob | history | |
src/make/ibl_c6472/ibl_objs_template.inc | patch | blob | history | |
src/make/ibl_c6474/ibl_objs_template.inc | patch | blob | history | |
src/make/ibl_c6474l/ibl_objs_template.inc | patch | blob | history |
index d1af17ad938f5dda31ba7f50691c770018f31979..38f9f4334dd004abb7d725d468754ad06a85b3a0 100644 (file)
C6X_C_DIR+= ;$(IBL_ROOT)/hw/nors
C6X_C_DIR+= ;$(IBL_ROOT)/driver/eth
C6X_C_DIR+= ;$(IBL_ROOT)/hw/spi
C6X_C_DIR+= ;$(IBL_ROOT)/hw/nors
C6X_C_DIR+= ;$(IBL_ROOT)/driver/eth
C6X_C_DIR+= ;$(IBL_ROOT)/hw/spi
-C6X_C_DIR+= ;$(IBL_ROOT)/hw/uart/c66x_uart
+C6X_C_DIR+= ;$(IBL_ROOT)/hw/uart
export C6X_C_DIR
vpath % $(IBL_ROOT)/device/$(TARGET)
export C6X_C_DIR
vpath % $(IBL_ROOT)/device/$(TARGET)
diff --git a/src/device/c66x/c66x.c b/src/device/c66x/c66x.c
index 51e83cdd1657c208625ad1ead0d23b91bc8a33cb..e7a2cf7ec894cd4066d0632de80e3d0dd7513cbf 100755 (executable)
--- a/src/device/c66x/c66x.c
+++ b/src/device/c66x/c66x.c
#include "spi_api.h"
#include <string.h>
#include <stdint.h>
#include "spi_api.h"
#include <string.h>
#include <stdint.h>
-#include "evmc66x_uart.h"
+#include "uart.h"
#define PLL_DDR_INIT_LOOPMAX 10
#define IBL_RESULT_CODE_STR_LEN 20
#define PLL_DDR_INIT_LOOPMAX 10
#define IBL_RESULT_CODE_STR_LEN 20
index 86910102dd5a8fe517d99909e2b5fe3e7b074a12..009331d0a2ef71dfc7180cc04003319d8c267f50 100644 (file)
# If no target specified, set CSRC to all files (used for clean)
ifeq ($(TARGET),c6472)
# If no target specified, set CSRC to all files (used for clean)
ifeq ($(TARGET),c6472)
- CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c
+ CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c null_uart.c
else
ifeq ($(TARGET),c6474)
else
ifeq ($(TARGET),c6474)
- CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c sgmii.c
+ CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c sgmii.c null_uart.c
else
ifeq ($(TARGET),c6474l)
else
ifeq ($(TARGET),c6474l)
- CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c sgmii.c
+ CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c sgmii.c null_uart.c
else
ifeq ($(TARGET),c6457)
else
ifeq ($(TARGET),c6457)
- CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c sgmiicur.c
+ CSRC= t64.c cpmacdrv.c pll.c psc.c emif31.c mdio.c gpio.c nandgpio.c i2c.c sgmiicur.c null_uart.c
else
ifeq ($(TARGET),c6455)
else
ifeq ($(TARGET),c6455)
- CSRC= t64.c cpmacdrv.c pll.c emif31.c mdio.c gpio.c nandgpio.c i2c.c
+ CSRC= t64.c cpmacdrv.c pll.c emif31.c mdio.c gpio.c nandgpio.c i2c.c null_uart.c
else
ifeq ($(TARGET),c66x)
CSRC= t64.c pll.c cfgpll.c cfgpll2.c mdio.c i2c.c psc.c cpsw.c qm.c cpdma.c pa.c sgmii.c serdes.c gmacsl.c emif4.c gpio.c
else
ifeq ($(TARGET),c66x)
CSRC= t64.c pll.c cfgpll.c cfgpll2.c mdio.c i2c.c psc.c cpsw.c qm.c cpdma.c pa.c sgmii.c serdes.c gmacsl.c emif4.c gpio.c
C6X_C_DIR+= ;$(IBL_ROOT)/hw/spi
C6X_C_DIR+= ;$(IBL_ROOT)/hw/nors
C6X_C_DIR+= ;$(IBL_ROOT)/hw/emif25
C6X_C_DIR+= ;$(IBL_ROOT)/hw/spi
C6X_C_DIR+= ;$(IBL_ROOT)/hw/nors
C6X_C_DIR+= ;$(IBL_ROOT)/hw/emif25
+C6X_C_DIR+= ;$(IBL_ROOT)/hw/uart
C6X_C_DIR+= ;$(IBL_ROOT)/ecc
export C6X_C_DIR
C6X_C_DIR+= ;$(IBL_ROOT)/ecc
export C6X_C_DIR
vpath % $(ECODIR)/gpio
vpath % $(ECODIR)/nands/gpio
vpath % $(ECODIR)/i2c
vpath % $(ECODIR)/gpio
vpath % $(ECODIR)/nands/gpio
vpath % $(ECODIR)/i2c
+ vpath % $(ECODIR)/uart/null_uart
endif
ifeq ($(TARGET),c6474)
endif
ifeq ($(TARGET),c6474)
vpath % $(ECODIR)/nands/gpio
vpath % $(ECODIR)/i2c
vpath % $(ECODIR)/sgmii
vpath % $(ECODIR)/nands/gpio
vpath % $(ECODIR)/i2c
vpath % $(ECODIR)/sgmii
+ vpath % $(ECODIR)/uart/null_uart
endif
ifeq ($(TARGET),c6474l)
endif
ifeq ($(TARGET),c6474l)
vpath % $(ECODIR)/nands/gpio
vpath % $(ECODIR)/i2c
vpath % $(ECODIR)/sgmii
vpath % $(ECODIR)/nands/gpio
vpath % $(ECODIR)/i2c
vpath % $(ECODIR)/sgmii
+ vpath % $(ECODIR)/uart/null_uart
endif
ifeq ($(TARGET),c6457)
endif
ifeq ($(TARGET),c6457)
vpath % $(ECODIR)/nands/gpio
vpath % $(ECODIR)/i2c
vpath % $(ECODIR)/sgmii
vpath % $(ECODIR)/nands/gpio
vpath % $(ECODIR)/i2c
vpath % $(ECODIR)/sgmii
+ vpath % $(ECODIR)/uart/null_uart
endif
ifeq ($(TARGET),c6455)
endif
ifeq ($(TARGET),c6455)
vpath % $(ECODIR)/gpio
vpath % $(ECODIR)/nands/gpio
vpath % $(ECODIR)/i2c
vpath % $(ECODIR)/gpio
vpath % $(ECODIR)/nands/gpio
vpath % $(ECODIR)/i2c
+ vpath % $(ECODIR)/uart/null_uart
endif
ifeq ($(TARGET),c66x)
endif
ifeq ($(TARGET),c66x)
index 5dad2766d258c9f73d54b2ce19a8553d468b8554..6f8067a8e6a9bcb423eb0b9b7e5403850d09ad7f 100755 (executable)
#ifndef _EVM66X_I2C_UART_H_
#define _EVM66X_I2C_UART_H_
#ifndef _EVM66X_I2C_UART_H_
#define _EVM66X_I2C_UART_H_
+#include "uart.h"
#include <stdint.h>
#define UART_REGS_BASE (0x02540000)
#include <stdint.h>
#define UART_REGS_BASE (0x02540000)
#define UART_LSR_THRE_MASK (0x00000020u)
#define UART_THR_DATA_MASK (0x000000FFu)
#define UART_LSR_THRE_MASK (0x00000020u)
#define UART_THR_DATA_MASK (0x000000FFu)
-/************************
- * Function declarations
- ************************/
-void uart_init(void);
-void uart_write_string(char * str, uint32_t length);
-
#endif /* _EVM66X_I2C_UART_H_ */
#endif /* _EVM66X_I2C_UART_H_ */
diff --git a/src/hw/uart/null_uart/null_uart.c b/src/hw/uart/null_uart/null_uart.c
--- /dev/null
@@ -0,0 +1,63 @@
+/******************************************************************************
+ * Copyright (c) 2011 Texas Instruments Incorporated - http://www.ti.com
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *****************************************************************************/
+
+#include "uart.h"
+
+/******************************************************************************
+ *
+ * Function: uart_init
+ *
+ * Description: This function initializes UART peripheral for C66x
+ *
+ * Parameters: none
+ * Return Value: none
+ ******************************************************************************/
+void uart_init(void)
+{
+}
+
+/******************************************************************************
+ *
+ * Function: uart_write_string
+ *
+ * Description: This function writes a string of data to UART device
+ *
+ * Parameters: str - string to print
+ * length - length of the string to print, maximum is 80
+ *
+ * Return Value: none
+ ******************************************************************************/
+void uart_write_string(char * str, uint32_t length)
+{
+}
+
diff --git a/src/hw/uart/uart.h b/src/hw/uart/uart.h
--- /dev/null
+++ b/src/hw/uart/uart.h
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * Copyright (c) 2011 Texas Instruments Incorporated - http://www.ti.com
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * File Name: evmc66x_uart.h
+ *
+ * Description: This contains the UART API
+ *
+ ******************************************************************************/
+#ifndef _UART_H_
+#define _UART_H_
+
+#include <stdint.h>
+
+/************************
+ * Function declarations
+ ************************/
+void uart_init(void);
+void uart_write_string(char * str, uint32_t length);
+
+#endif /* _UART_H_ */
index b546c601ed3224e1e22b5994988dafcf69fffa84..3ca570510daf1bfc284fde1f9fe7f731f087636f 100644 (file)
C6X_C_DIR+= ;$(IBL_ROOT)/norboot
C6X_C_DIR+= ;$(IBL_ROOT)/driver/timer
C6X_C_DIR+= ;$(IBL_ROOT)/hw/i2c
C6X_C_DIR+= ;$(IBL_ROOT)/norboot
C6X_C_DIR+= ;$(IBL_ROOT)/driver/timer
C6X_C_DIR+= ;$(IBL_ROOT)/hw/i2c
-C6X_C_DIR+= ;$(IBL_ROOT)/hw/uart/c66x_uart
+C6X_C_DIR+= ;$(IBL_ROOT)/hw/uart
C6X_C_DIR+= ;$(IBL_ROOT)/hw/spi
C6X_C_DIR+= ;$(IBL_ROOT)/cfg/$(TARGET)
C6X_C_DIR+= ;$(STDINC)
C6X_C_DIR+= ;$(IBL_ROOT)/hw/spi
C6X_C_DIR+= ;$(IBL_ROOT)/cfg/$(TARGET)
C6X_C_DIR+= ;$(STDINC)
diff --git a/src/main/iblmain.c b/src/main/iblmain.c
index 20955acb23ce220aea3da09d6b2afe6c2c6d7dbc..52f6c107452ef54cec8909a13585cbdc0f500725 100755 (executable)
--- a/src/main/iblmain.c
+++ b/src/main/iblmain.c
#include "spi_api.h"
#include "ibl_elf.h"
#include <string.h>
#include "spi_api.h"
#include "ibl_elf.h"
#include <string.h>
-#include "evmc66x_uart.h"
+#include "uart.h"
extern cregister unsigned int IER;
extern cregister unsigned int IER;
index 1fb45c457775ca139e7742ea11723607fab922b8..0fd7dd1cab0eabcba2bf6de3f89afcbef5b419d1 100644 (file)
../driver/c64x/make/timer.ENDIAN_TAG.oc
../hw/c64x/make/t64.ENDIAN_TAG.oc
../hw/c64x/make/emif31.ENDIAN_TAG.oc
../driver/c64x/make/timer.ENDIAN_TAG.oc
../hw/c64x/make/t64.ENDIAN_TAG.oc
../hw/c64x/make/emif31.ENDIAN_TAG.oc
+../hw/c64x/make/null_uart.ENDIAN_TAG.oc
#ifndef EXCLUDE_BIS
#ifndef EXCLUDE_BIS
index 2822632650663afb08b8808fad1df0d2737a072d..76eb221a4167be0e7c3063d4e138cead703f91ca 100644 (file)
../hw/c64x/make/t64.ENDIAN_TAG.oc
../hw/c64x/make/psc.ENDIAN_TAG.oc
../hw/c64x/make/emif31.ENDIAN_TAG.oc
../hw/c64x/make/t64.ENDIAN_TAG.oc
../hw/c64x/make/psc.ENDIAN_TAG.oc
../hw/c64x/make/emif31.ENDIAN_TAG.oc
+../hw/c64x/make/null_uart.ENDIAN_TAG.oc
#ifndef EXCLUDE_BIS
#ifndef EXCLUDE_BIS
index f4d7ba6a1686b0c75d68f9ff47570fd199911e4b..a2da4989f071ee9b528f4a36d5f56770d6600357 100644 (file)
../hw/c64x/make/t64.ENDIAN_TAG.oc
../hw/c64x/make/psc.ENDIAN_TAG.oc
../hw/c64x/make/emif31.ENDIAN_TAG.oc
../hw/c64x/make/t64.ENDIAN_TAG.oc
../hw/c64x/make/psc.ENDIAN_TAG.oc
../hw/c64x/make/emif31.ENDIAN_TAG.oc
+../hw/c64x/make/null_uart.ENDIAN_TAG.oc
#ifndef EXCLUDE_BIS
#ifndef EXCLUDE_BIS
index 87a24e274bd02a80b90de4d8944ad1bf4c332d79..93fd060b8ae8039f3d4c3543ca38afa72f87d9ed 100644 (file)
../hw/c64x/make/t64.ENDIAN_TAG.oc
../hw/c64x/make/psc.ENDIAN_TAG.oc
../hw/c64x/make/emif31.ENDIAN_TAG.oc
../hw/c64x/make/t64.ENDIAN_TAG.oc
../hw/c64x/make/psc.ENDIAN_TAG.oc
../hw/c64x/make/emif31.ENDIAN_TAG.oc
+../hw/c64x/make/null_uart.ENDIAN_TAG.oc
#ifndef EXCLUDE_BIS
#ifndef EXCLUDE_BIS
index 86b79a9e2c22e2e030fccc31dee42dc6a8376ddc..3f9a71ddf7f2cdd0dd40a275455a6b5ff28fca20 100644 (file)
../hw/c64x/make/t64.ENDIAN_TAG.oc
../hw/c64x/make/psc.ENDIAN_TAG.oc
../hw/c64x/make/emif31.ENDIAN_TAG.oc
../hw/c64x/make/t64.ENDIAN_TAG.oc
../hw/c64x/make/psc.ENDIAN_TAG.oc
../hw/c64x/make/emif31.ENDIAN_TAG.oc
+../hw/c64x/make/null_uart.ENDIAN_TAG.oc
#ifndef EXCLUDE_BIS
#ifndef EXCLUDE_BIS