Permalink
Browse files

Import old working HDMI driver from 3.2 kernel

6a3b828 hdmi: Fix Video port mapping in NXP driver
ac8ac07 Replace entire code with version recommended by NXP, add late_initcall to tda988x.c

so now we have:
OLD: drivers/video/display/nxp
NEW: drivers/video/display/nxp-hdmi

Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
  • Loading branch information...
1 parent 406cbdf commit 9711b57cc4bd327c2c7ed1777790d39e2cef9c11 Joel A Fernandes committed Nov 13, 2012
Showing with 54,063 additions and 0 deletions.
  1. +59 −0 drivers/video/nxp/MakeModules
  2. +204 −0 drivers/video/nxp/Makefile
  3. +1,804 −0 drivers/video/nxp/comps/tmbslHdmiTx/inc/tmbslHdmiTx_types.h
  4. +141 −0 drivers/video/nxp/comps/tmbslTDA9989/inc/tmbslHdmiTx_funcMapping.h
  5. +3,060 −0 drivers/video/nxp/comps/tmbslTDA9989/inc/tmbslTDA9989_Functions.h
  6. +1,572 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_Edid.c
  7. +62 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_Edid_l.h
  8. +655 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_HDCP.c
  9. +72 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_HDCP_l.h
  10. +5,101 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_InOut.c
  11. +112 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_InOut_l.h
  12. +2,512 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_Misc.c
  13. +62 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_Misc_l.h
  14. +240 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_State.c
  15. +56 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_State_l.h
  16. +670 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_local.c
  17. +2,056 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_local.h
  18. +54 −0 drivers/video/nxp/comps/tmbslTDA9989/src/tmbslTDA9989_local_otp.h
  19. +305 −0 drivers/video/nxp/comps/tmdlHdmiCEC/cfg/tmdlHdmiCEC_IW.h
  20. +436 −0 drivers/video/nxp/comps/tmdlHdmiCEC/cfg/tmdlHdmiCEC_Linux.c
  21. +107 −0 drivers/video/nxp/comps/tmdlHdmiCEC/cfg/tmdlHdmiCEC_cfg.h
  22. BIN drivers/video/nxp/comps/tmdlHdmiCEC/docs/02_sw_req_an/tmdlHdmiCEC_API.zip
  23. BIN drivers/video/nxp/comps/tmdlHdmiCEC/docs/14_user_doc/HDMI_CEC_User_Manual.pdf
  24. +46 −0 drivers/video/nxp/comps/tmdlHdmiCEC/inc/tmdlHdmiCEC.h
  25. +3,166 −0 drivers/video/nxp/comps/tmdlHdmiCEC/inc/tmdlHdmiCEC_Functions.h
  26. +1,083 −0 drivers/video/nxp/comps/tmdlHdmiCEC/inc/tmdlHdmiCEC_Types.h
  27. +7,575 −0 drivers/video/nxp/comps/tmdlHdmiCEC/src/tmdlHdmiCEC.c
  28. +280 −0 drivers/video/nxp/comps/tmdlHdmiCEC/src/tmdlHdmiCEC_local.c
  29. +221 −0 drivers/video/nxp/comps/tmdlHdmiCEC/src/tmdlHdmiCEC_local.h
  30. +570 −0 drivers/video/nxp/comps/tmdlHdmiTx/cfg/TDA9989/tmdlHdmiTx_Linux_cfg.c
  31. +624 −0 drivers/video/nxp/comps/tmdlHdmiTx/cfg/TDA9989/tmdlHdmiTx_cfg.c
  32. +290 −0 drivers/video/nxp/comps/tmdlHdmiTx/cfg/tmdlHdmiTx_IW.h
  33. +298 −0 drivers/video/nxp/comps/tmdlHdmiTx/cfg/tmdlHdmiTx_cfg.h
  34. BIN drivers/video/nxp/comps/tmdlHdmiTx/docs/02_sw_req_an/tmdlHdmiTx_API.zip
  35. BIN drivers/video/nxp/comps/tmdlHdmiTx/docs/14_user_doc/TRANSMITTER_TDA998X_SW_UM_Devlib.pdf
  36. +52 −0 drivers/video/nxp/comps/tmdlHdmiTx/inc/tmdlHdmiTx.h
  37. +1,806 −0 drivers/video/nxp/comps/tmdlHdmiTx/inc/tmdlHdmiTx_Functions.h
  38. +1,066 −0 drivers/video/nxp/comps/tmdlHdmiTx/inc/tmdlHdmiTx_Types.h
  39. +7,166 −0 drivers/video/nxp/comps/tmdlHdmiTx/src/tmdlHdmiTx.c
  40. +342 −0 drivers/video/nxp/comps/tmdlHdmiTx/src/tmdlHdmiTx_local.c
  41. +702 −0 drivers/video/nxp/comps/tmdlHdmiTx/src/tmdlHdmiTx_local.h
  42. +237 −0 drivers/video/nxp/inc/tmFlags.h
  43. +1,743 −0 drivers/video/nxp/inc/tmNxCompId.h
  44. +366 −0 drivers/video/nxp/inc/tmNxTypes.h
  45. +417 −0 drivers/video/nxp/linux_hdmi_release_note.txt
  46. +2,307 −0 drivers/video/nxp/tda998x.c
  47. +143 −0 drivers/video/nxp/tda998x.h
  48. +2,157 −0 drivers/video/nxp/tda998x_cec.c
  49. +140 −0 drivers/video/nxp/tda998x_cec.h
  50. +1,123 −0 drivers/video/nxp/tda998x_ioctl.h
  51. +17 −0 drivers/video/nxp/tda998x_version.h
  52. +28 −0 drivers/video/nxp/test/Makefile
  53. +758 −0 drivers/video/nxp/test/demo_tda.c
@@ -0,0 +1,59 @@
+PACKAGE_NAME:=hdmi
+
+RULES:=compile
+
+ARCH:=arm
+CROSS_COMPILE:=/home/joel/oe-arm-angstrom-linux-gnueabi-
+VARS:= ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE)
+# VARS:= V=1 ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE)
+
+# module to be put in driver/video/hdmi
+
+LINUX_DIR=/home/joel/work/code/kernel/linux-dvi-audio/git/
+LINUXKERNEL_SRC=$(LINUX_DIR)
+
+all: $(RULES)
+
+compile:
+ @echo "\t-----> $(PACKAGE_NAME):$@"
+# @rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions *.c.* *.h.*
+# @mv tda998x_version.h temp && cat temp | awk '$$2~"PATCHLEVEL" {$$3=$$3+1};{print};' >tda998x_version.h && rm temp
+ $(MAKE) -C $(LINUXKERNEL_SRC) M=`pwd` $(VARS) modules
+# @touch $@
+
+uptx:
+ adb shell hdmi_off
+ adb shell rm hdmitx.ko
+ adb shell rmmod hdmitx
+ adb push hdmitx.ko hdmitx.ko
+ adb shell insmod hdmitx.ko verbose=1
+ adb shell hdmi_on
+
+upcec:
+ adb shell rm hdmicec.ko
+ adb shell rmmod hdmicec
+ adb push hdmicec.ko hdmicec.ko
+ adb shell insmod hdmicec.ko verbose=1 device=4
+
+strip:
+ strip -g -I elf32-little hdmitx.ko -o hdmitx_striped.ko
+ strip -g -I elf32-little hdmicec.ko -o hdmicec_striped.ko
+
+clean:
+ @echo "\t-----> $(PACKAGE_NAME):$@"
+ @rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions *.c.* *.h.* *.symvers *.order
+ @if [ -e comps/tmdlHdmiTx/src ]; then cd comps/tmdlHdmiTx/src && rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions *.c.* *.h.*; fi
+ @if [ -e comps/tmdlHdmiTx/cfg/TDA9989 ]; then cd comps/tmdlHdmiTx/cfg/TDA9989 && rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions *.c.* *.h.*; fi
+ @if [ -e comps/tmdlHdmiCEC/src ]; then cd comps/tmdlHdmiCEC/src && rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions *.c.* *.h.*; fi
+ @if [ -e comps/tmdlHdmiCEC/cfg ]; then cd comps/tmdlHdmiCEC/cfg && rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions *.c.* *.h.*; fi
+ @if [ -e comps/tmdlTDA9983/src ]; then cd comps/tmdlTDA9983/src && rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions *.c.* *.h.*; fi
+ @if [ -e comps/tmdlTDA9983/cfg ]; then cd comps/tmdlTDA9983/cfg && rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions *.c.* *.h.*; fi
+ @if [ -e comps/tmbslTDA9989/src ]; then cd comps/tmbslTDA9989/src && rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions *.c.* *.h.*; fi
+ @if [ -e comps/tmbslTDA9984NoHdcp/src ]; then cd comps/tmbslTDA9984NoHdcp/src && rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions *.c.* *.h.*; fi
+ @if [ -e comps/tmbslTDA9983/src ]; then cd comps/tmbslTDA9983/src && rm -rf *.o *.ko *.mod.c .*.cmd .tmp_versions *.c.* *.h.*; fi
+
+ @if [ -e .compiled ]; then rm .compiled; fi
+
+# install: .install
+# .install:
+# cp ....
View
@@ -0,0 +1,204 @@
+
+############### select your chip + platform here ###################
+
+# TDA_TX := TDA19989
+TDA_TX := TDA19988
+# TDA_TX := TDA9984
+# TDA_TX := TDA9983
+# TDA_TX := TDA9981
+
+TDA_PLATFORM := ZOOMII
+# TDA_PLATFORM := OTHERS
+
+############### features on demand #################################
+
+#TDA_HDCP := 0
+TDA_HDCP := TMFL_HDCP_SUPPORT
+TDA_CEC := TDA9950
+
+# add this if INTERRUPT is wired, otherwise polling with timer is used
+#EXTRA_CFLAGS += -DIRQ
+
+# add this to get PC video format
+# EXTRA_CFLAGS += -DFORMAT_PC
+
+# add this to disable automatic set of input/output video resolution
+# EXTRA_CFLAGS += -DUSER_SET_INPUT_OUTPUT
+
+####################################################################
+
+EXTRA_CFLAGS += -DFUNC_PTR=" " -DCONST_DAT="const " -DRAM_DAT=" "
+EXTRA_CFLAGS += -DTDA_NAME=$(TDA_TX)
+EXTRA_CFLAGS += -DTMFL_LINUX_OS_KERNEL_DRIVER
+EXTRA_CFLAGS += -DTMFL_NO_RTOS
+# EXTRA_CFLAGS += -DI2C_DBG
+
+ifeq ($(TDA_PLATFORM),ZOOMII)
+EXTRA_CFLAGS += -DTMFL_CFG_ZOOMII
+EXTRA_CFLAGS += -DZOOMII_PATCH
+EXTRA_CFLAGS += -DTWL4030_HACK
+# EXTRA_CFLAGS += -DANDROID_DSS
+EXTRA_CFLAGS += -DGUI_OVER_HDMI
+endif
+
+ifeq ($(TDA_TX),TDA19988)
+EXTRA_CFLAGS += -DTMFL_TDA19988
+TDA_TX := TDA19989
+endif
+
+ifeq ($(TDA_TX),TDA19989)
+EXTRA_CFLAGS += -DTMFL_TDA19989 -DTMFL_TDA9989
+ifeq ($(TDA_HDCP),TMFL_HDCP_SUPPORT)
+EXTRA_CFLAGS += -D$(TDA_HDCP)
+else
+EXTRA_CFLAGS += -DNO_HDCP
+endif
+endif
+
+ifeq ($(TDA_TX),TDA9984)
+EXTRA_CFLAGS += -DNO_HDCP
+endif
+
+ifeq ($(TDA_TX),TDA9981)
+EXTRA_CFLAGS += -DTMFL_TDA9981_SUPPORT -DTMFL_RX_SENSE_ON
+endif
+
+########## devlib ##################################################
+
+ifeq ($(TDA_TX),TDA19989)
+TXSRC := comps/tmdlHdmiTx/src
+TXCFG := comps/tmdlHdmiTx/cfg/TDA9989
+CECSRC := comps/tmdlHdmiCEC/src
+CECCFG := comps/tmdlHdmiCEC/cfg
+endif
+
+ifeq ($(TDA_TX),TDA9984)
+TXSRC := comps/tmdlHdmiTx/src
+TXCFG := comps/tmdlHdmiTx/cfg/TDA9989
+endif
+
+ifeq ($(TDA_TX),TDA9983)
+TXSRC := comps/tmdlTDA9983/src
+TXCFG := comps/tmdlTDA9983/cfg
+endif
+
+ifeq ($(TDA_TX),TDA9981)
+TXSRC := comps/tmdlTDA9983/src
+TXCFG := comps/tmdlTDA9983/cfg
+endif
+
+########## board service layer #####################################
+
+ifeq ($(TDA_TX),TDA19989)
+BSL := comps/tmbslTDA9989/src
+endif
+
+ifeq ($(TDA_TX),TDA9984)
+BSL := comps/tmbslTDA9984NoHdcp/src
+endif
+
+ifeq ($(TDA_TX),TDA9983)
+BSL := comps/tmbslTDA9983/src
+endif
+
+ifeq ($(TDA_TX),TDA9981)
+BSL := comps/tmbslTDA9983/src
+endif
+
+####################################################################
+
+obj-y += hdmitx.o
+ifeq ($(TDA_CEC),TDA9950)
+obj-m += hdmicec.o
+endif
+
+# Linux module
+hdmitx-objs := tda998x.o
+hdmicec-objs := tda998x_cec.o
+
+# NXP comps
+ifeq ($(TDA_TX),TDA19989)
+hdmitx-objs += $(TXSRC)/tmdlHdmiTx.o
+hdmitx-objs += $(TXSRC)/tmdlHdmiTx_local.o
+hdmitx-objs += $(TXCFG)/tmdlHdmiTx_cfg.o
+hdmitx-objs += $(BSL)/tmbslTDA9989_local.o
+hdmitx-objs += $(BSL)/tmbslTDA9989_InOut.o
+hdmitx-objs += $(BSL)/tmbslTDA9989_HDCP.o
+hdmitx-objs += $(BSL)/tmbslTDA9989_State.o
+hdmitx-objs += $(BSL)/tmbslTDA9989_Misc.o
+hdmitx-objs += $(BSL)/tmbslTDA9989_Edid.o
+hdmicec-objs += $(CECSRC)/tmdlHdmiCEC.o
+hdmicec-objs += $(CECSRC)/tmdlHdmiCEC_local.o
+hdmicec-objs += $(CECCFG)/tmdlHdmiCEC_Linux.o
+endif
+
+ifeq ($(TDA_TX),TDA9984)
+hdmitx-objs += $(TXSRC)/tmdlHdmiTx.o
+hdmitx-objs += $(TXSRC)/tmdlHdmiTx_local.o
+hdmitx-objs += $(TXCFG)/tmdlHdmiTx_Linux.o
+hdmitx-objs += $(BSL)/tmbslTDA9984_local.o
+hdmitx-objs += $(BSL)/tmbslTDA9984_InOut.o
+hdmitx-objs += $(BSL)/tmbslTDA9984_HDCP.o
+hdmitx-objs += $(BSL)/tmbslTDA9984_State.o
+hdmitx-objs += $(BSL)/tmbslTDA9984_Misc.o
+hdmitx-objs += $(BSL)/tmbslTDA9984_Edid.o
+endif
+
+ifeq ($(TDA_TX),TDA9983)
+hdmitx-objs += $(BSL)/tmbslHdmiTx_2.o
+hdmitx-objs += $(BSL)/tmbslHdmiTx_1.o
+hdmitx-objs += $(BSL)/tmbslHdmiTx_local.o
+hdmitx-objs += $(TXSRC)/tmdlHdmiTx.o
+hdmitx-objs += $(TXCFG)/tmdlHdmiTx_Linux.o
+endif
+
+ifeq ($(TDA_TX),TDA9981)
+hdmitx-objs += $(BSL)/tmbslHdmiTx_2.o
+hdmitx-objs += $(BSL)/tmbslHdmiTx_1.o
+hdmitx-objs += $(BSL)/tmbslHdmiTx_local.o
+hdmitx-objs += $(TXSRC)/tmdlHdmiTx.o
+hdmitx-objs += $(TXCFG)/tmdlHdmiTx_Linux.o
+endif
+
+####################################################################
+
+EXTRA_CFLAGS += -I$(obj)
+EXTRA_CFLAGS += -I$(obj)/inc
+
+ifeq ($(TDA_TX),TDA19989)
+EXTRA_CFLAGS += -I$(obj)/comps/tmbslHdmiTx/inc
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlHdmiTx/src
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlHdmiTx/cfg
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlHdmiTx/inc
+EXTRA_CFLAGS += -I$(obj)/comps/tmbslTDA9989/inc
+EXTRA_CFLAGS += -I$(obj)/comps/tmbslTDA9989/src
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlHdmiCEC/inc
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlHdmiCEC/src
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlHdmiCEC/cfg
+endif
+
+ifeq ($(TDA_TX),TDA9984)
+EXTRA_CFLAGS += -I$(obj)/comps/tmbslHdmiTx/inc
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlHdmiTx/src
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlHdmiTx/cfg
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlHdmiTx/inc
+EXTRA_CFLAGS += -I$(obj)/comps/tmbslTDA9984NoHdcp/inc
+EXTRA_CFLAGS += -I$(obj)/comps/tmbslTDA9984NoHdcp/src
+endif
+
+ifeq ($(TDA_TX),TDA9983)
+EXTRA_CFLAGS += -I$(obj)/comps/tmbslTDA9983/inc
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlTDA9983/inc
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlTDA9983/src
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlTDA9983/cfg
+endif
+
+ifeq ($(TDA_TX),TDA9981)
+EXTRA_CFLAGS += -I$(obj)/comps/tmbslTDA9983/inc
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlTDA9983/inc
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlTDA9983/src
+EXTRA_CFLAGS += -I$(obj)/comps/tmdlTDA9983/cfg
+endif
+
+
+
Oops, something went wrong.

0 comments on commit 9711b57

Please sign in to comment.