├── .gitignore ├── data ├── minisatip ├── html │ ├── sm.jpg │ ├── sm.png │ └── status.html ├── firmware │ ├── dvb-stbx25xx-vid.fw │ ├── dvb-stbx25xx-aud-c.fw │ └── dvb-stbx25xx-aud-d.fw ├── satip.sh ├── misc │ └── udhcpc-hostname.sh └── hotplug.sh ├── docs ├── 205-00453-0-STBx25.pdf ├── linuxppc-2.6.9-dream-s7.diff ├── stbx25xx-driver │ ├── aud │ │ ├── s5amp317.bin │ │ ├── s5amp317.dat │ │ ├── s5amp318.bin │ │ ├── s5amp318.dat │ │ ├── Makefile │ │ ├── clip.make │ │ ├── readme.txt │ │ ├── drv.make │ │ ├── aud_osd.h │ │ └── aud_osi_mixer.c │ ├── vid │ │ ├── s025v306.bin │ │ ├── vid_t.h │ │ ├── Makefile │ │ ├── clip.make │ │ ├── osi.make │ │ ├── tv.make │ │ ├── atom.make │ │ ├── readme.txt │ │ ├── vid_osi_scr.h │ │ └── vid_osd.h │ ├── demux │ │ ├── pvrtest │ │ │ ├── readme.pdf │ │ │ ├── test_rec.h │ │ │ ├── Makefile │ │ │ └── mysem.c │ │ ├── pvr_atom_dcr.h │ │ ├── xp_osi_pcr.h │ │ ├── pvr_osi.h │ │ ├── Makefile │ │ ├── xp_osi_cchan.h │ │ ├── xp_osi_clk.h │ │ ├── pvr_atom_register.h │ │ ├── pvr_atom_reg.h │ │ └── xp_osi_key.h │ ├── avcore │ │ ├── README │ │ └── Makefile │ ├── include │ │ ├── app │ │ │ └── tv_function.h │ │ ├── clip │ │ │ ├── clipinfo.h │ │ │ └── clip.h │ │ ├── os │ │ │ ├── pversion.h │ │ │ ├── os-types.h │ │ │ ├── os-generic.h │ │ │ ├── helper-pool.h │ │ │ ├── os-sync.h │ │ │ ├── drv_debug.h │ │ │ └── helper-queue.h │ │ ├── ir │ │ │ ├── ir_osi_device.h │ │ │ ├── ir_osi_acer_kbms.h │ │ │ └── ir_osi_hitachi.h │ │ ├── hw │ │ │ └── hardware.h │ │ ├── xp │ │ │ └── pvr_osd.h │ │ ├── rtc_fpc │ │ │ └── rtc_fpc.h │ │ ├── ttx │ │ │ └── ttx_osd_user.h │ │ ├── scp_inf.h │ │ ├── scp │ │ │ └── scp_inf.h │ │ ├── sci │ │ │ └── sci_inf.h │ │ └── gpt │ │ │ └── gpt_atom.h │ ├── release_clean.sh │ ├── tools │ │ └── Makefile │ ├── rtc_fpc │ │ ├── README.TXT │ │ ├── Makefile │ │ ├── rtc_fpc_local.h │ │ └── rtc_t.c │ ├── eeprom │ │ ├── Makefile │ │ └── ee_t.c │ ├── fe_sonysat │ │ ├── readme.txt │ │ ├── Makefile │ │ └── tuner.h │ ├── scp │ │ ├── test │ │ │ ├── sem.h │ │ │ └── sem.c │ │ ├── Makefile │ │ ├── scp_osi.h │ │ ├── scp_osd.h │ │ └── xilinx.h │ ├── Makefile │ ├── os │ │ ├── helper-queue-local.h │ │ ├── helper-pool-local.h │ │ ├── Makefile │ │ ├── os-interrupt-local.h │ │ └── os_inf.c │ ├── clip │ │ ├── clip.h │ │ └── clip_t.c │ ├── ttx │ │ ├── Makefile │ │ ├── powerpc.c │ │ ├── ttx.h │ │ ├── test_ttx.readme │ │ └── ttx_dbg.h │ ├── gfx │ │ ├── gfx_osi_local.h │ │ ├── osd_dcr.h │ │ ├── osd_local.h │ │ ├── test │ │ │ └── Makefile │ │ └── Makefile │ ├── ir │ │ ├── README │ │ ├── test │ │ │ └── tstrawir.c │ │ ├── Makefile │ │ ├── ir_osi_acer-local.h │ │ └── ir_atom.h │ ├── sci │ │ ├── Makefile │ │ ├── test │ │ │ └── mu_sci.h │ │ └── README │ └── config.make ├── README.md └── ibmstbx25.c ├── device_table_dev.txt └── BUILDING.md /.gitignore: -------------------------------------------------------------------------------- 1 | /buildroot/ 2 | -------------------------------------------------------------------------------- /data/minisatip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/data/minisatip -------------------------------------------------------------------------------- /data/html/sm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/data/html/sm.jpg -------------------------------------------------------------------------------- /data/html/sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/data/html/sm.png -------------------------------------------------------------------------------- /docs/205-00453-0-STBx25.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/docs/205-00453-0-STBx25.pdf -------------------------------------------------------------------------------- /data/firmware/dvb-stbx25xx-vid.fw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/data/firmware/dvb-stbx25xx-vid.fw -------------------------------------------------------------------------------- /docs/linuxppc-2.6.9-dream-s7.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/docs/linuxppc-2.6.9-dream-s7.diff -------------------------------------------------------------------------------- /data/firmware/dvb-stbx25xx-aud-c.fw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/data/firmware/dvb-stbx25xx-aud-c.fw -------------------------------------------------------------------------------- /data/firmware/dvb-stbx25xx-aud-d.fw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/data/firmware/dvb-stbx25xx-aud-d.fw -------------------------------------------------------------------------------- /docs/stbx25xx-driver/aud/s5amp317.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/docs/stbx25xx-driver/aud/s5amp317.bin -------------------------------------------------------------------------------- /docs/stbx25xx-driver/aud/s5amp317.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/docs/stbx25xx-driver/aud/s5amp317.dat -------------------------------------------------------------------------------- /docs/stbx25xx-driver/aud/s5amp318.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/docs/stbx25xx-driver/aud/s5amp318.bin -------------------------------------------------------------------------------- /docs/stbx25xx-driver/aud/s5amp318.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/docs/stbx25xx-driver/aud/s5amp318.dat -------------------------------------------------------------------------------- /docs/stbx25xx-driver/vid/s025v306.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/docs/stbx25xx-driver/vid/s025v306.bin -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/pvrtest/readme.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mildsunrise/dm500-satip/HEAD/docs/stbx25xx-driver/demux/pvrtest/readme.pdf -------------------------------------------------------------------------------- /docs/stbx25xx-driver/avcore/README: -------------------------------------------------------------------------------- 1 | README for combined A/V driver 2 | 3 | This is a combination of audio/video/demux drivers 4 | 5 | Please refer to readme of each driver for more information. 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/app/tv_function.h: -------------------------------------------------------------------------------- 1 | 2 | #define PLAY_TO_MEMORY 0 3 | #define PLAY_TO_DECODE 1 4 | 5 | int get_program_count(int fd_pat); 6 | int start_program(int fd_pmt, int fd_a, 7 | int fd_v, int fd_pcr, int uProgNumber, int flag); 8 | -------------------------------------------------------------------------------- /data/satip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Called at startup to start serving SAT>IP. 3 | 4 | # Load DVB module 5 | modprobe dvb_stbx25xx 6 | 7 | # Start SAT>IP server 8 | minisatip -R /usr/share/minisatip/html -x 80 \ 9 | -f > /dev/null & 10 | 11 | exit 0 12 | -------------------------------------------------------------------------------- /data/misc/udhcpc-hostname.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 4 | 5 | case "$1" in 6 | renew|bound) 7 | if [ -n "$hostname" ]; then 8 | hostname $hostname 9 | fi 10 | ;; 11 | esac 12 | 13 | exit 0 14 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/vid/vid_t.h: -------------------------------------------------------------------------------- 1 | #ifndef PALLAS_VID_T_H 2 | #define PALLAS_VID_T_H 3 | 4 | int vid_t_dispsize(int fd); 5 | int vid_t_fastforward(int fd); 6 | int vid_t_slowmotion(int fd); 7 | int vid_t_get_bufsize(int fd); 8 | int vid_t_scale(int fd); 9 | #endif 10 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/release_clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -f *.scc *.bak *.local 3 | rm -f $(find -name *.scc) 4 | rm -f $(find -name *.dsp) 5 | rm -f $(find -name *.bak) 6 | 7 | 8 | dos2unix $(find -name "*.c" -type f ) $(find -name "*.h" -type f ) $(find -type f -name "*.make") $(find -type f -name "Makefile") 9 | 10 | -------------------------------------------------------------------------------- /data/hotplug.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Simple hotplug script to load firmware. 3 | 4 | if [ ! -z "$FIRMWARE" ]; then 5 | BLOB="/lib/firmware/$FIRMWARE" 6 | if [ -f "$BLOB" ]; then 7 | echo 1 > /sys/$DEVPATH/loading 8 | cat $BLOB > /sys/$DEVPATH/data 9 | echo 0 > /sys/$DEVPATH/loading 10 | else 11 | echo -1 > /sys/$DEVPATH/loading 12 | fi 13 | fi 14 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/tools/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # gfx makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := img2header 6 | 7 | LOCAL_TEST := 8 | 9 | LOCAL_CPP_OPT := 10 | 11 | 12 | include ../config.local 13 | 14 | 15 | OBJS := 16 | 17 | COMMONHEADERS = 18 | 19 | all: $(LOCAL_TARGET) 20 | 21 | $(LOCAL_TARGET) : img2header.c 22 | gcc -o $@ $< 23 | 24 | 25 | .PHONY : clean 26 | 27 | test_apps: 28 | 29 | clean : 30 | rm -f $(LOCAL_TARGET) 31 | 32 | 33 | install : -------------------------------------------------------------------------------- /docs/stbx25xx-driver/rtc_fpc/README.TXT: -------------------------------------------------------------------------------- 1 | General Information of Driver for the RTC and Front Panel Controller on stbx25xx chip. 2 | 3 | Module Name: 4 | stbrtc.o 5 | 6 | Files: 7 | rtc_fpc.c rtc_t.c 8 | rtc_fpc_local.h 9 | include/rtc_fpc/rtc_fpc.h 10 | 11 | Device Name 12 | /dev/stbrtc 13 | 14 | Node 15 | mknod /dev/stbrtc c 240 0 16 | 17 | Major No is 240 18 | 19 | Application 20 | rtc_t --> It reads the real time clock, sets the alarm clock and 21 | reads the alarm clock. 22 | 23 | --------------------------------------------------------------------------- -------------------------------------------------------------------------------- /docs/stbx25xx-driver/aud/Makefile: -------------------------------------------------------------------------------- 1 | ######################################################################################## 2 | # main make file for aud 3 | ######################################################################################## 4 | 5 | all : aud_drv #oss 6 | 7 | aud_drv : 8 | make -f drv.make 9 | 10 | #oss: 11 | # make -f oss.make 12 | 13 | clip_apps: 14 | make -f clip.make 15 | 16 | test_apps: clip_apps 17 | 18 | install : 19 | make -f drv.make install 20 | make -f clip.make install 21 | # make -f oss.make install 22 | 23 | clean : 24 | make -f drv.make clean 25 | make -f clip.make clean 26 | # make -f oss.make clean 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/vid/Makefile: -------------------------------------------------------------------------------- 1 | ######################################################################################## 2 | # main make file for vid 3 | ######################################################################################## 4 | 5 | all : vid_atom vid_osi clip tv 6 | 7 | .BOSS : configs 8 | 9 | vid_atom : 10 | make -f atom.make 11 | 12 | vid_osi : 13 | make -f osi.make 14 | 15 | clip: 16 | make -f clip.make 17 | 18 | tv: 19 | make -f tv.make 20 | 21 | test_apps: 22 | 23 | install : 24 | make -f atom.make install 25 | make -f osi.make install 26 | make -f clip.make install 27 | make -f tv.make install 28 | 29 | clean : 30 | make -f atom.make clean 31 | make -f osi.make clean 32 | make -f clip.make clean 33 | make -f tv.make clean 34 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/pvrtest/test_rec.h: -------------------------------------------------------------------------------- 1 | 2 | #define PLAY_TO_MEMORY 0 3 | #define PLAY_TO_DECODE 1 4 | #define PLAY_TO_BUCKET 2 5 | #define PLAY_TO_BUCKET_ONLY 3 6 | #define PLAY_TO_MEMORY_ONLY 4 7 | 8 | typedef struct { 9 | unsigned short program; 10 | unsigned short dmxid; 11 | unsigned short pmt_pid; 12 | unsigned short aud_pid; 13 | unsigned short vid_pid; 14 | unsigned short pcr_pid; 15 | } PROGRAM; 16 | typedef struct { 17 | unsigned short programcount; 18 | unsigned short dmxid; 19 | unsigned short net_pid; 20 | PROGRAM prog[0]; 21 | } PRGUIDE; 22 | 23 | int start_programx(PROGRAM *prog, int fd_v, int fd_a, int fd_pcr, int flag); 24 | int get_program_info(PROGRAM *prog); 25 | int get_pat(int dmxid, PRGUIDE **p); 26 | 27 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/clip/clipinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef PALLAS_CLIPINFO_H 2 | #define PALLAS_CLIPINFO_H 3 | 4 | typedef struct tagBufInfo 5 | { 6 | unsigned long ulStartAdrOff; //start address offset 7 | unsigned long ulLen; //buffer length 8 | }BUFINFO; 9 | 10 | typedef struct tagClipInfo 11 | { 12 | unsigned long ulBufAdrOff; //buffer segment start address offset, user never change it 13 | unsigned long ulBufLen; //buffer segment length, user never change it 14 | unsigned long uClipAdrOff; //clip start address offset; must > ulBufAdrOff 15 | unsigned long uClipLen; //clip length; uClipAdrOff + uClipLen < ulBufAdrOff + ulBufLen 16 | unsigned int uFlag; //1: end of stream flag 17 | void *pOtherInfo; //pointer to other information 18 | }CLIPINFO; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/vid/clip.make: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # ircombo makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := vclip_t 6 | 7 | LOCAL_DEFINE := 8 | 9 | include ../config.local 10 | 11 | 12 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 13 | 14 | 15 | 16 | all: $(LOCAL_TARGET) 17 | 18 | $(LOCAL_TARGET): vclip_t.c 19 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -o $@ $< 20 | 21 | .PHONY : clean 22 | 23 | 24 | clean : 25 | rm -f $(OBJS) $(LOCAL_TARGET) 26 | 27 | install : $(LOCAL_TARGET) 28 | @if [ ! -d $(LOCALBIN_DIR) ] ; then \ 29 | echo "Creating target directory : " $(LOCALBIN_DIR) ; \ 30 | mkdir -p $(LOCALBIN_DIR) ; \ 31 | fi 32 | install $(LOCAL_TARGET) $(LOCALBIN_DIR) 33 | 34 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/vid/osi.make: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # ircombo makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := vidosi.o 6 | 7 | LOCAL_DEFINE := -DEXPORT_SYMTAB 8 | 9 | include ../config.local 10 | 11 | 12 | OBJS := vid_osi.o vid_osd.o vid_inf.o vid_osi_scr.o 13 | 14 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/hw/gpt_ports.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 15 | 16 | 17 | 18 | all: $(LOCAL_TARGET) 19 | 20 | %.o: %.c 21 | $(CC) $(LOCAL_DEFINE) $(BASE_MODCFLAGS) -c -o $@ $< 22 | 23 | $(LOCAL_TARGET) : $(OBJS) 24 | $(LD) -m elf32ppclinux -r -o $@ $(OBJS) 25 | # $(STRIP) $@ 26 | 27 | .PHONY : clean 28 | 29 | test_apps: 30 | 31 | clean : 32 | rm -f $(OBJS) $(LOCAL_TARGET) 33 | 34 | install : $(LOCAL_TARGET) 35 | 36 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/aud/clip.make: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # ircombo makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := aclip_t 6 | 7 | LOCAL_DEFINE := 8 | 9 | include ../config.local 10 | 11 | 12 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 13 | 14 | 15 | 16 | all: $(LOCAL_TARGET) 17 | 18 | $(LOCAL_TARGET): aclip_t.c 19 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -o $@ $< -lpthread 20 | 21 | .PHONY : clean 22 | 23 | 24 | clean : 25 | rm -f $(OBJS) $(LOCAL_TARGET) 26 | 27 | install : $(LOCAL_TARGET) 28 | @if [ ! -d $(LOCALBIN_DIR) ] ; then \ 29 | echo "Creating target directory : " $(LOCALBIN_DIR) ; \ 30 | mkdir -p $(LOCALBIN_DIR) ; \ 31 | fi 32 | install $(LOCAL_TARGET) $(LOCALBIN_DIR) 33 | 34 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/vid/tv.make: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # ircombo makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := tv_t 6 | 7 | LOCAL_DEFINE := 8 | 9 | include ../config.local 10 | 11 | 12 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 13 | 14 | 15 | 16 | all: $(LOCAL_TARGET) 17 | 18 | $(LOCAL_TARGET): tv_t.c vid_t.c ../demux/tv_function.c 19 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -o $@ $^ 20 | 21 | .PHONY : clean 22 | 23 | 24 | clean : 25 | rm -f $(OBJS) $(LOCAL_TARGET) 26 | 27 | install : $(LOCAL_TARGET) 28 | @if [ ! -d $(LOCALBIN_DIR) ] ; then \ 29 | echo "Creating target directory : " $(LOCALBIN_DIR) ; \ 30 | mkdir -p $(LOCALBIN_DIR) ; \ 31 | fi 32 | install $(LOCAL_TARGET) $(LOCALBIN_DIR) 33 | 34 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/eeprom/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # ircombo makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := ee_t 6 | 7 | LOCAL_DEFINE := -DPALLAS 8 | 9 | include ../config.local 10 | 11 | 12 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/hw/gpt_ports.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 13 | 14 | 15 | 16 | all: $(LOCAL_TARGET) 17 | 18 | $(LOCAL_TARGET): eeprom.c ee_t.c 19 | $(CC) -I$(DRV_INCLUDE_DIR) $(LOCAL_DEFINE) -I$(LSP_INCLUDE_DIR) -o $@ $^ 20 | 21 | .PHONY : clean 22 | 23 | test_apps: 24 | 25 | 26 | clean : 27 | rm -f $(OBJS) $(LOCAL_TARGET) 28 | 29 | install : $(LOCAL_TARGET) 30 | @if [ ! -d $(LOCALBIN_DIR) ] ; then \ 31 | echo "Creating target directory : " $(LOCALBIN_DIR) ; \ 32 | mkdir -p $(LOCALBIN_DIR) ; \ 33 | fi 34 | install $(LOCAL_TARGET) $(LOCALBIN_DIR) 35 | 36 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/fe_sonysat/readme.txt: -------------------------------------------------------------------------------- 1 | General Information of Driver for the Tuner on Redwood6. 2 | 3 | Module Name: 4 | 5 | fe_sonysat - installable kernel module (insmod fe_sonysat) 6 | 7 | Files: 8 | 9 | tuner.c cstuner.c tuner_test.c cstuner.h tuner.h 10 | 11 | Device Name 12 | 13 | /dev/fe_sonysat 14 | 15 | Node 16 | 17 | mknod /dev/fe_sonysat c 250 0 18 | 19 | Major No is 250 20 | 21 | Application 22 | 23 | tuner_test lnb disecq symbolrate freq 24 | 25 | lnb = 1 power vertical 26 | 2 power horizontal 27 | 28 | disecq = 0 22KHZ off 29 | 1 22KHZ on 30 | 31 | symbolrate = Kbaud 32 | 33 | freq = MHz 34 | 35 | 36 | This test application can be used to program the Sony satellite tuner 37 | provided with the STBx25xx evaluation kit. 38 | 39 | --------------------------------------------------------------------------- -------------------------------------------------------------------------------- /docs/stbx25xx-driver/avcore/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # avcore makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := av_core.o 6 | 7 | LOCAL_TEST := 8 | 9 | LOCAL_CFLAGS := 10 | 11 | include ../config.local 12 | 13 | 14 | OBJS := av_inf.o ../aud/aud.o ../vid/vidatom.o ../vid/vidosi.o ../demux/demux.o 15 | 16 | COMMONHEADERS = 17 | 18 | 19 | all: $(LOCAL_TARGET) 20 | 21 | %.o: %.c 22 | $(CC) $(BASE_MODCFLAGS) $(LOCAL_CFLAGS) -c -o $@ $< 23 | 24 | $(LOCAL_TARGET) : $(OBJS) 25 | $(LD) -m elf32ppclinux -r -o $@ $(OBJS) 26 | # $(STRIP) $@ 27 | 28 | av_inf.o : av_inf.c 29 | 30 | .PHONY : clean 31 | 32 | test_apps: 33 | 34 | clean : 35 | rm -f $(OBJS) $(LOCAL_TARGET) $(LOCAL_TEST) 36 | 37 | install : $(LOCAL_TARGET) 38 | @if [ ! -d $(INSTALL_ROOT)/lib/modules/$(VER)/misc ] ; then \ 39 | echo "Creating target directory : " $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 40 | mkdir -p $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 41 | fi 42 | install $(LOCAL_TARGET) $(INSTALL_ROOT)/lib/modules/$(VER)/misc 43 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | This folder is a general storage of valuable info I have been 2 | able to rescue, that is useful when developing for the DM500. 3 | 4 | It includes: 5 | 6 | - `205-00453-0-STBx25.pdf`: PDF with the overall architecture of 7 | the STBx25xx. 8 | 9 | - `ibmstbx25.{c,h}`: Platform code for the STBx25xx, extracted from 10 | the Linux repository just before the files were removed. 11 | 12 | - `linuxppc-2.6.9-r1.diff`, `linuxppc-2.6.9-dream-s7.diff`: these 13 | two patches must be applied, in order, to Linux 2.6.9 in order to 14 | get the working kernel that is used in the official firmware images. 15 | 16 | They do *not* add support for DVB, framebuffer, smartcard, audio 17 | and GPIO: those are provided via a `head.ko` module, for which 18 | no source is available. It can be found at any DM500 image (make 19 | sure it doesn't come with a timebomb if you have a clone). 20 | 21 | - `stbx25xx-driver`: folder containing what appears to be the source 22 | code for IBM ~~STBx25xx~~ drivers. The firmware blobs were extracted 23 | from this archive. 24 | 25 | **Warning:** actually STB043xx, it seems. However, firmware verification 26 | went okay, and registers appear to match... 27 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/pvrtest/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # ircombo makefile 3 | #################################################################################### 4 | 5 | LOCAL_TEST := test_rec_bkt_nb test_rec_ts_nb test_rec_pes_nb test_pvr_nb 6 | 7 | include ../../config.local 8 | 9 | 10 | OBJS := test_rec_bkt_nb.o test_rec_ts_nb.o test_rec_pes_nb.o test_pvr_nb.o 11 | 12 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 13 | 14 | 15 | all: $(LOCAL_TEST) 16 | 17 | 18 | test_rec_bkt_nb : test_rec_bkt_nb.c 19 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -o $@ $^ 20 | 21 | test_rec_pes_nb : test_rec_pes_nb.c 22 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -o $@ $^ -lpthread 23 | 24 | test_rec_ts_nb : test_rec_ts_nb.c 25 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -o $@ $^ 26 | 27 | test_pvr_nb : test_pvr_nb.c 28 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -o $@ $^ -lpthread 29 | 30 | .PHONY : clean 31 | 32 | clean : 33 | rm -f $(OBJS) $(LOCAL_TEST) 34 | 35 | 36 | install : $(LOCAL_TEST) 37 | @if [ ! -d $(LOCALBIN_DIR) ] ; then \ 38 | echo "Creating target directory : " $(LOCALBIN_DIR) ; \ 39 | mkdir -p $(LOCALBIN_DIR) ; \ 40 | fi 41 | install $(LOCAL_TEST) $(LOCALBIN_DIR) 42 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/vid/atom.make: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # video atom makefile 3 | #################################################################################### 4 | 5 | #################################################################################### 6 | # Make sure you have the correct micro code file listed here 7 | #################################################################################### 8 | 9 | VIDEO_MICRO_CODE = s025v306.bin 10 | 11 | 12 | LOCAL_TARGET := vidatom.o 13 | 14 | LOCAL_DEFINE := -DEXPORT_SYMTAB 15 | 16 | include ../config.local 17 | 18 | 19 | OBJS := vid_atom.o vid_atom_clip.o vid_atom_int.o vid_atom_others.o vid_atom_sync.o vid_atom_denc.o 20 | 21 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/hw/gpt_ports.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 22 | 23 | 24 | 25 | all: vid_uc.h $(LOCAL_TARGET) 26 | 27 | vid_uc.h: $(VIDEO_MICRO_CODE) 28 | ../tools/img2header $< $@ -x -d vid_ucode -n vid_ucode_len -s 29 | 30 | %.o: %.c 31 | $(CC) $(LOCAL_DEFINE) $(BASE_MODCFLAGS) -c -o $@ $< 32 | 33 | $(LOCAL_TARGET) : $(OBJS) 34 | $(LD) -m elf32ppclinux -r -o $@ $(OBJS) 35 | # $(STRIP) $@ 36 | 37 | .PHONY : clean 38 | 39 | test_apps: 40 | 41 | clean : 42 | rm -f $(OBJS) $(LOCAL_TARGET) vid_uc.h 43 | 44 | install : $(LOCAL_TARGET) 45 | 46 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/aud/readme.txt: -------------------------------------------------------------------------------- 1 | IBM STB audio decoder device driver for Linux(ver 0.9a) 2 | 3 | Config and Build: 4 | Make sure you have the correct microcode. 5 | Edit drv.make, change the below two lines according to your microcode file name 6 | AUDIO_MICRO_BIN = XXXXXXXX.bin 7 | AUDIO_MICRO_DAT = XXXXXXXX.dat 8 | 9 | 10 | Main function: 11 | 1. decode stream from demux (play, stop, freeze) 12 | 2. decode clip from memory 13 | There are two interfaces for this function, write and mmap. Transferring data 14 | from user space to decoder buffer by mmap is more efficient than by write 15 | operation. Please refer to aud_t.c for detailed information. 16 | 3. PES, ES, PCM playback are supported 17 | 18 | 19 | Installation: 20 | 21 | 22 | (install aud.o to your module directory) This step is unused now 23 | 24 | install aud_t to your application directory 25 | mknod /etc/adec_dev c 203 0 26 | 27 | File List: 28 | ATOM layer: 29 | aud_atom.c 30 | aud_atom.h 31 | vid_atom_local.h 32 | OSI layer: 33 | aud_osi.c 34 | aud_osi.h 35 | OSD layer: 36 | aud_osd.c 37 | aud_osd.h 38 | INF layer 39 | aud_inf.c 40 | ../include/aud/aud_inf.h 41 | ../include/aud/aud_types.h 42 | APP layer: 43 | aud_t.c clip playback test 44 | Note: 45 | major number of video device is 203 46 | 47 | ___________________________________________________________ 48 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/scp/test/sem.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1997, 1999, 2001, 2003 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | #ifndef _scp_atom_h_ 21 | #define _scp_atom_h_ 22 | 23 | int CreateSemaphore(int ); 24 | void SemPost( int); 25 | void SemWait( int); 26 | void DeleteSemaphore( int ); 27 | #endif 28 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/fe_sonysat/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # tuner driver makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := fe_sonysat 6 | LOCAL_TEST := tuner_test 7 | 8 | LOCAL_CPP_OPT := 9 | # -D__GFX_INF_HELPER_DEBUG -D__GFX_INF_DEBUG -D__GFX_ATOM_DEBUG \ 10 | # -D__GFX_OSI_DEBUG -D__GFX_SURFACE_DEBUG -D__OSD_ATOM_DEBUG -D__OSD_FB_DEBUG \ 11 | # -D__OSD_OSI_DEBUG 12 | 13 | 14 | include ../config.local 15 | 16 | 17 | OBJS := tuner.o cstuner.o 18 | 19 | 20 | all: $(LOCAL_TARGET) $(LOCAL_TEST) 21 | 22 | %.o: %.c 23 | $(CC) $(BASE_MODCFLAGS) $(LOCAL_CPP_OPT) -c -o $@ $< 24 | 25 | $(LOCAL_TARGET) : $(OBJS) 26 | $(LD) -m elf32ppclinux -r -o $@ $^ 27 | 28 | tuner.o : tuner.c tuner.h 29 | 30 | cstuner.o : cstuner.c cstuner.h tuner.h 31 | 32 | $(LOCAL_TEST) : tuner_test.c tuner.h 33 | $(CC) -I$(DRV_INCLUDE_DIR) -o $@ $< 34 | 35 | test_apps: $(LOCAL_TEST) 36 | 37 | .PHONY : clean 38 | 39 | clean : 40 | rm -f *~ $(OBJS) $(LOCAL_TARGET) $(LOCAL_TEST) 41 | 42 | install : $(LOCAL_TARGET) $(LOCAL_TEST) 43 | @if [ ! -d $(INSTALL_ROOT)/lib/modules/$(VER)/misc ] ; then \ 44 | echo "Creating target directory : " $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 45 | mkdir -p $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 46 | fi 47 | install $(LOCAL_TARGET) $(INSTALL_ROOT)/lib/modules/$(VER)/misc 48 | install $(LOCAL_TEST) $(LOCALBIN_DIR) 49 | 50 | 51 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/rtc_fpc/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # rtc_fpc makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := stbrtc.o 6 | LOCAL_TEST := rtc_t 7 | 8 | LOCAL_CPP_OPT := 9 | # -D__GFX_INF_HELPER_DEBUG -D__GFX_INF_DEBUG -D__GFX_ATOM_DEBUG \ 10 | # -D__GFX_OSI_DEBUG -D__GFX_SURFACE_DEBUG -D__OSD_ATOM_DEBUG -D__OSD_FB_DEBUG \ 11 | # -D__OSD_OSI_DEBUG 12 | 13 | 14 | include ../config.local 15 | 16 | 17 | OBJS := rtc_fpc.o 18 | 19 | 20 | all: $(LOCAL_TARGET) $(LOCAL_TEST) 21 | 22 | %.o: %.c 23 | $(CC) $(BASE_MODCFLAGS) $(LOCAL_CPP_OPT) -c -o $@ $< 24 | 25 | $(LOCAL_TARGET) : $(OBJS) 26 | $(LD) -m elf32ppclinux -r -o $@ $^ 27 | 28 | rtc_fpc.o : rtc_fpc.c $(DRV_INCLUDE_DIR)/rtc_fpc/rtc_fpc.h rtc_fpc_local.h 29 | 30 | $(LOCAL_TEST) : rtc_t.c $(DRV_INCLUDE_DIR)/rtc_fpc/rtc_fpc.h 31 | $(CC) -I$(DRV_INCLUDE_DIR) -o $@ $< 32 | 33 | test_apps: $(LOCAL_TEST) 34 | 35 | .PHONY : clean 36 | 37 | clean : 38 | rm -f *~ $(OBJS) $(LOCAL_TARGET) $(LOCAL_TEST) 39 | 40 | install : $(LOCAL_TARGET) $(LOCAL_TEST) 41 | @if [ ! -d $(INSTALL_ROOT)/lib/modules/$(VER)/misc ] ; then \ 42 | echo "Creating target directory : " $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 43 | mkdir -p $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 44 | fi 45 | install $(LOCAL_TARGET) $(INSTALL_ROOT)/lib/modules/$(VER)/misc 46 | install $(LOCAL_TEST) $(LOCALBIN_DIR) 47 | 48 | 49 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/Makefile: -------------------------------------------------------------------------------- 1 | ######################################################################################## 2 | # main make file at the top level 3 | ######################################################################################## 4 | 5 | MODULESDIR = tools os gfx demux aud vid ttx avcore ir sci eeprom rtc_fpc fe_sonysat scp # add your here 6 | 7 | 8 | all : configs modules test_apps 9 | 10 | 11 | .BOSS : configs 12 | 13 | configs : config.local 14 | 15 | config.local : config.make 16 | @echo "Making local config file ..." 17 | @make -f config.make 18 | 19 | modules : 20 | @echo "Making modules ..." 21 | @for i in $(MODULESDIR); do \ 22 | if ! make -C $$i ; then\ 23 | exit -1;\ 24 | fi\ 25 | done 26 | 27 | test_apps: 28 | @echo "Making test applications ..." 29 | @for i in $(MODULESDIR); do \ 30 | if ! make -C $$i test_apps ; then\ 31 | exit -1;\ 32 | fi\ 33 | done 34 | 35 | 36 | install: configs modules test_apps 37 | @if [ $(shell whoami) != "root" ]; then\ 38 | echo "**************************************************************"; \ 39 | echo "* Warning: Root is required to install modules properly ! *"; \ 40 | echo "**************************************************************"; \ 41 | fi 42 | @for i in $(MODULESDIR); do \ 43 | if ! make -C $$i install ; then\ 44 | exit -1;\ 45 | fi\ 46 | done 47 | 48 | clean : 49 | @echo "Cleaning targets ..." 50 | @for i in $(MODULESDIR); do \ 51 | if ! make -C $$i clean ; then\ 52 | exit -1;\ 53 | fi\ 54 | done 55 | 56 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/scp/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # scp makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := scp_drv.o 6 | LOCAL_TEST := scpt 7 | 8 | include ../config.local 9 | 10 | OBJS := scp_atom.o scp_osd.o scp_osi.o scp_inf.o xilinx.o 11 | 12 | #COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/hw/gpt_ports.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 13 | 14 | 15 | all: $(LOCAL_TARGET) $(LOCAL_TEST) 16 | 17 | %.o: %.c 18 | $(CC) $(LOCAL_DEFINE) $(BASE_MODCFLAGS) -c -o $@ $< 19 | 20 | $(LOCAL_TARGET) : $(OBJS) 21 | $(LD) -m elf32ppclinux -r -o $@ $(OBJS) 22 | # $(STRIP) $@ 23 | 24 | .PHONY : clean 25 | 26 | test_apps: $(LOCAL_TEST) 27 | 28 | $(LOCAL_TEST) : test/mu_scp.c test/sflash.c test/sflash_test.c test/sem.c 29 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(DRV_INCLUDE_DIR) -o $@ $^ 30 | 31 | clean : 32 | rm -f $(OBJS) $(LOCAL_TARGET) $(LOCAL_TEST) 33 | 34 | install : $(LOCAL_TARGET) $(LOCAL_TEST) 35 | #install : $(LOCAL_TARGET) 36 | @if [ ! -d $(INSTALL_ROOT)/lib/modules/$(VER)/misc ] ; then \ 37 | echo "Creating target directory : " $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 38 | mkdir -p $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 39 | fi 40 | install $(LOCAL_TARGET) $(INSTALL_ROOT)/lib/modules/$(VER)/misc 41 | @if [ ! -d $(LOCALBIN_DIR) ] ; then \ 42 | echo "Creating target directory : " $(LOCALBIN_DIR) ; \ 43 | mkdir -p $(LOCALBIN_DIR) ; \ 44 | fi 45 | install $(LOCAL_TEST) $(LOCALBIN_DIR) 46 | 47 | 48 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/vid/readme.txt: -------------------------------------------------------------------------------- 1 | IBM STB video decoder device driver for Linux(ver 0.9a) 2 | 3 | Config and build: 4 | 5 | Make sure your video microcode file is correct, we assume it is named as "sXvstdXX.bin" 6 | Edit atom.make, change the line "VIDEO_MICRO_CODE = xxx" according to your micro code 7 | 8 | 9 | Main function: 10 | 1. decode stream from demux (play, stop, freeze) 11 | 2. decode clip from memory 12 | There are two interfaces for this function, write and mmap. Transferring data 13 | from user space to decoder buffer by mmap is more efficient than by write 14 | operation. Please refer to vclip_t.c for detailed information. 15 | 3. Both PAL and NTSC stream are supported 16 | 17 | Installation: 18 | 19 | (install vidatom.o to your module directory) This step is not used now 20 | (install vidosi.o to your module directory) This step is not used now 21 | 22 | install vclip_t to your application directory 23 | install tv_t to your application directory 24 | mknod /etc/vdec_dev c 202 0 25 | 26 | File List: 27 | ATOM layer: 28 | vid_atom.c 29 | vid_atom_clip.c 30 | vid_atom_int.c 31 | vid_atom_others.c 32 | vid_atom_sync.c 33 | vid_atom.h 34 | vid_atom_local.h 35 | OSI layer: 36 | vid_osi.c 37 | vid_osi.h 38 | OSD layer: 39 | vid_osd.c 40 | vid_osd.h 41 | INF layer 42 | vid_inf.c 43 | ../include/vid/vid_inf.h 44 | ../include/vid/vid_types.h 45 | APP layer: 46 | vclip_t.c clip playback test 47 | tv_t.c tv function test 48 | vid_t.c video function subroutine (scale function can not work yet) 49 | Note: 50 | major number of video device is 202 51 | 52 | 53 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/os/helper-queue-local.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/os/helper-queue-local.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // Private header of Common Queue helper routines 25 | //Revision Log: 26 | // Sept/05/2001 Created by YYD 27 | 28 | #ifndef _DRV_OS_HELPER_QUEUE_LOCAL_H_INC_ 29 | #define _DRV_OS_HELPER_QUEUE_LOCAL_H_INC_ 30 | 31 | #include 32 | 33 | #define __HELPER_QUEUE_MEMALLOC 0x0001 34 | 35 | #endif // _DRV_OS_HELPER_QUEUE_LOCAL_H_INC_ 36 | 37 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/os/helper-pool-local.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/os/helper-pool-local.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // Private header of Common Pool helper routines 25 | //Revision Log: 26 | // Sept/27/2001 Created by YYD 27 | 28 | #ifndef _DRV_OS_HELPER_POOL_LOCAL_H_INC_ 29 | #define _DRV_OS_HELPER_POOL_LOCAL_H_INC_ 30 | 31 | #define __HELPER_POOL_MEMALLOC 0x0001 32 | 33 | typedef struct __POOL_CHAIN_STRUCTURE__ 34 | { 35 | struct __POOL_CHAIN_STRUCTURE__ *pNext; 36 | } POOL_CHAIN_T; 37 | 38 | #endif // _DRV_OS_HELPER_QUEUE_LOCAL_H_INC_ 39 | 40 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/pvrtest/mysem.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | int CreateSemaphore(int ); 5 | int SemPost( int); 6 | int SemWait( int); 7 | void DeleteSemaphore( int ); 8 | 9 | int CreateSemaphore(int count ) 10 | { 11 | int semid; 12 | 13 | #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) 14 | union semun parm /* union is defined by including */ 15 | #else 16 | /* according to X/OPEN we have to define it ourselves */ 17 | union semun { 18 | int val; /* value for SETVAL */ 19 | struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */ 20 | unsigned short *array; /* array for GETALL, SETALL */ 21 | /* Linux specific part: */ 22 | struct seminfo *__buf; /* buffer for IPC_INFO */ 23 | } parm; 24 | #endif 25 | 26 | semid = semget( IPC_PRIVATE, 1, 0664 | IPC_CREAT | IPC_EXCL ); 27 | if( semid < 0 ) 28 | return(-1); 29 | parm.val = count; 30 | if( semctl( semid, 0, SETVAL, parm) < 0) 31 | { 32 | DeleteSemaphore( semid ); 33 | return(-1); 34 | } 35 | return(semid); 36 | } 37 | 38 | void DeleteSemaphore( int semid ) 39 | { 40 | semctl( semid, IPC_RMID, 0 ); 41 | return; 42 | } 43 | 44 | int SemPost( int semid ) 45 | { 46 | struct sembuf sem; 47 | 48 | sem.sem_num = 0; 49 | sem.sem_op = 1; 50 | sem.sem_flg = 0; 51 | 52 | if(semop( semid, &sem, 1 ) == -1 ) 53 | return(-1); 54 | else 55 | return(0); 56 | } 57 | 58 | int SemWait( int semid ) 59 | { 60 | struct sembuf sem; 61 | 62 | sem.sem_num = 0; 63 | sem.sem_op = -1; 64 | sem.sem_flg = 0; 65 | 66 | if( semop( semid, &sem, 1 ) == -1 ) 67 | return(-1); 68 | else 69 | return(0); 70 | } 71 | 72 | 73 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/clip/clip.h: -------------------------------------------------------------------------------- 1 | #ifndef PALLAS_CLIP_H 2 | #define PALLAS_CLIP_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "clipinfo.h" 8 | 9 | #define CLIP_STOPPED 0 10 | #define CLIP_PLAYING 1 11 | #define CLIP_PAUSED 2 12 | 13 | 14 | 15 | struct tagClipDev 16 | { 17 | QUEUE_T bufq; //buffer queue 18 | QUEUE_T clipq; //clip info queue 19 | UINT uQueueSize; //queue size 20 | ULONG uBufLen; //the length of each segment of the buffer 21 | INT nOff; //offset between read pointer and remove pointer 22 | UINT uStatus; 23 | SEMAPHORE_T sema; 24 | INT nLeft; //empty slot left 25 | INT (*write_clip_to_dev)(CLIPINFO* pClipInfo); 26 | INT (*is_buf_ready)(void); 27 | }; 28 | 29 | typedef struct tagClipDev *CLIPDEV_T; 30 | 31 | CLIPDEV_T clipdev_create(ULONG uBufSegLen, 32 | UINT uBufSegNum, 33 | INT (*write_clip)(CLIPINFO* pClipInfo), 34 | INT (*buf_ready)(void)); 35 | INT clipdev_delete(CLIPDEV_T ); 36 | INT clipdev_get_buf_wait(CLIPDEV_T , CLIPINFO* pClipInfo); 37 | INT clipdev_get_buf_nowait(CLIPDEV_T , CLIPINFO* pClipInfo); 38 | INT clipdev_get_buf_status(CLIPDEV_T ); 39 | UINT clipdev_get_clip_status(CLIPDEV_T ); 40 | INT clipdev_write(CLIPDEV_T , CLIPINFO *pClipInfo); 41 | INT clipdev_write_ex(CLIPDEV_T , CLIPINFO *pClipInfo); 42 | INT clipdev_start(CLIPDEV_T ); 43 | INT clipdev_stop(CLIPDEV_T ); 44 | INT clipdev_pause(CLIPDEV_T ); 45 | void clipdev_clipinfo_done(CLIPDEV_T ); 46 | void clipdev_dump(CLIPDEV_T ); 47 | #endif -------------------------------------------------------------------------------- /docs/stbx25xx-driver/ttx/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # TTX makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := ttx.o 6 | LOCAL_TEST := test_ttx 7 | 8 | include ../config.local 9 | 10 | 11 | OBJS := ttx_osd_inf.o ttx_drv.o ttx_vbi.o ttx_mbuf.o powerpc.o 12 | 13 | 14 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 15 | 16 | 17 | all: $(LOCAL_TARGET) 18 | 19 | %.o: %.c 20 | $(CC) $(BASE_MODCFLAGS) -c -o $@ $< 21 | 22 | ttx_osd_inf.o : ttx_osd_inf.c \ 23 | $(COMMONHEADERS) \ 24 | 25 | ttx_drv.o : ttx_drv.c \ 26 | $(COMMONHEADERS) \ 27 | 28 | ttx_vbi.o : ttx_vbi.c \ 29 | $(COMMONHEADERS) \ 30 | 31 | ttx_mbuf.o : ttx_mbuf.c \ 32 | $(COMMONHEADERS) \ 33 | 34 | powerpc.o : powerpc.c \ 35 | $(COMMONHEADERS) \ 36 | 37 | 38 | test_apps : $(LOCAL_TEST) 39 | 40 | $(LOCAL_TARGET) : $(OBJS) 41 | $(LD) -m elf32ppclinux -r -o $@ $(OBJS) 42 | # $(STRIP) $@ 43 | 44 | 45 | $(LOCAL_TEST) : test_ttx.c 46 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -lpthread -o $@ $^ 47 | 48 | 49 | .PHONY : clean 50 | 51 | clean : 52 | rm -f $(OBJS) $(LOCAL_TARGET) $(LOCAL_TEST) 53 | 54 | 55 | install : $(LOCAL_TARGET) $(LOCAL_TEST) 56 | @if [ ! -d $(INSTALL_ROOT)/lib/modules/$(VER)/misc ] ; then \ 57 | echo "Creating target directory : " $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 58 | mkdir -p $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 59 | fi 60 | install $(LOCAL_TARGET) $(INSTALL_ROOT)/lib/modules/$(VER)/misc 61 | @if [ ! -d $(LOCALBIN_DIR) ] ; then \ 62 | echo "Creating target directory : " $(LOCALBIN_DIR) ; \ 63 | mkdir -p $(LOCALBIN_DIR) ; \ 64 | fi 65 | install $(LOCAL_TEST) $(LOCALBIN_DIR) 66 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/clip/clip.h: -------------------------------------------------------------------------------- 1 | #ifndef PALLAS_CLIP_H 2 | #define PALLAS_CLIP_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "clipinfo.h" 8 | 9 | #define CLIP_STOPPED 0 10 | #define CLIP_PLAYING 1 11 | #define CLIP_PAUSED 2 12 | 13 | 14 | 15 | struct tagClipDev 16 | { 17 | QUEUE_T bufq; //buffer queue 18 | QUEUE_T clipq; //clip info queue 19 | UINT uQueueSize; //queue size 20 | ULONG uBufLen; //the length of each segment of the buffer 21 | INT nOff; //offset between read pointer and remove pointer 22 | UINT uStatus; 23 | SEMAPHORE_T sema; 24 | INT nLeft; //empty slot left 25 | INT (*write_clip_to_dev)(CLIPINFO* pClipInfo); 26 | INT (*is_buf_ready)(void); 27 | }; 28 | 29 | typedef struct tagClipDev *CLIPDEV_T; 30 | 31 | CLIPDEV_T clipdev_create(ULONG uBufSegLen, 32 | UINT uBufSegNum, 33 | INT (*write_clip)(CLIPINFO* pClipInfo), 34 | INT (*buf_ready)(void)); 35 | INT clipdev_delete(CLIPDEV_T ); 36 | INT clipdev_get_buf_wait(CLIPDEV_T , CLIPINFO* pClipInfo); 37 | INT clipdev_get_buf_nowait(CLIPDEV_T , CLIPINFO* pClipInfo); 38 | INT clipdev_get_buf_status(CLIPDEV_T ); 39 | UINT clipdev_get_clip_status(CLIPDEV_T ); 40 | INT clipdev_write(CLIPDEV_T , CLIPINFO *pClipInfo); 41 | INT clipdev_write_ex(CLIPDEV_T , CLIPINFO *pClipInfo); 42 | INT clipdev_hw_write(CLIPDEV_T clipdev); 43 | INT clipdev_start(CLIPDEV_T ); 44 | INT clipdev_stop(CLIPDEV_T ); 45 | INT clipdev_pause(CLIPDEV_T ); 46 | void clipdev_clipinfo_done(CLIPDEV_T ); 47 | void clipdev_dump(CLIPDEV_T ); 48 | #endif 49 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/os/pversion.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | 3 | | This source code has been made available to you by IBM on an AS-IS 4 | | basis. Anyone receiving this source is licensed under IBM 5 | | copyrights to use it in any way he or she deems fit, including 6 | | copying it, modifying it, compiling it, and redistributing it either 7 | | with or without modifications. No license under IBM patents or 8 | | patent applications is to be implied by the copyright license. 9 | | 10 | | Any user of this software should understand that IBM cannot provide 11 | | technical support for this software and will not be responsible for 12 | | any consequences resulting from the use of this software. 13 | | 14 | | Any person who transfers this source code or any derivative work 15 | | must include the IBM copyright notice, this paragraph, and the 16 | | preceding two paragraphs in the transferred software. 17 | | 18 | | COPYRIGHT I B M CORPORATION 1998 19 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 20 | +----------------------------------------------------------------------------*/ 21 | // Created by YYD 22 | 23 | #ifndef __PVERSION_H_INC__ 24 | #define __PVERSION_H_INC__ 25 | 26 | #include 27 | 28 | #define __STB_DRIVER_RELEASE__ "Feb/16/2004" 29 | 30 | #ifndef __DRV_VERSION__ // current version 31 | #define __DRV_VERSION__ "1.5" 32 | #endif 33 | 34 | 35 | #ifndef __DRV_DATE__ // last modified date 36 | #define __DRV_DATE__ "Feb/16/2004" 37 | #endif 38 | 39 | 40 | #define PVERSION(module_name) printk(KERN_NOTICE "\n%s " __DRV_VERSION__ "-" \ 41 | __DRV_DATE__ "@" __STB_DRIVER_RELEASE__ " Built " __DATE__ "/" __TIME__ " for " UTS_RELEASE "\n", module_name) 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/gfx/gfx_osi_local.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/gfx/gfx_osi_local.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // local header of OSI function of GFX controls 25 | //Revision Log: 26 | // Sept/28/2001 Created by YYD 27 | 28 | #ifndef _DRV_GFX_GFX_OSI_LOCAL_H_INC_ 29 | #define _DRV_GFX_GFX_OSI_LOCAL_H_INC_ 30 | 31 | 32 | //#include "gfx/gfx_surface.h" 33 | 34 | #include "../os/pm-alloc-local.h" 35 | 36 | // define the graphics root allocation data structure 37 | void *gpGraphicsPMRoot; 38 | UINT32 guGraphicsPhysicalAddr; 39 | UINT32 guGraphicsPhysicalSize; 40 | UINT32 guGraphicsPhysicalBase; 41 | void *guGraphicsLogicalAddr; 42 | 43 | 44 | #endif // _DRV_GFX_GFX_OSI_LOCAL_H_INC_ 45 | -------------------------------------------------------------------------------- /docs/ibmstbx25.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Author: Armin Kuster 3 | * 4 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under 5 | * the terms of the GNU General Public License version 2. This program 6 | * is licensed "as is" without any warranty of any kind, whether express 7 | * or implied. 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | static struct ocp_func_iic_data ibmstbx25_iic0_def = { 16 | .fast_mode = 0, /* Use standad mode (100Khz) */ 17 | }; 18 | OCP_SYSFS_IIC_DATA() 19 | 20 | struct ocp_def core_ocp[] __initdata = { 21 | { .vendor = OCP_VENDOR_IBM, 22 | .function = OCP_FUNC_16550, 23 | .index = 0, 24 | .paddr = UART0_IO_BASE, 25 | .irq = UART0_INT, 26 | .pm = IBM_CPM_UART0, 27 | }, 28 | { .vendor = OCP_VENDOR_IBM, 29 | .function = OCP_FUNC_16550, 30 | .index = 1, 31 | .paddr = UART1_IO_BASE, 32 | .irq = UART1_INT, 33 | .pm = IBM_CPM_UART1, 34 | }, 35 | { .vendor = OCP_VENDOR_IBM, 36 | .function = OCP_FUNC_16550, 37 | .index = 2, 38 | .paddr = UART2_IO_BASE, 39 | .irq = UART2_INT, 40 | .pm = IBM_CPM_UART2, 41 | }, 42 | { .vendor = OCP_VENDOR_IBM, 43 | .function = OCP_FUNC_IIC, 44 | .paddr = IIC0_BASE, 45 | .irq = IIC0_IRQ, 46 | .pm = IBM_CPM_IIC0, 47 | .additions = &ibmstbx25_iic0_def, 48 | .show = &ocp_show_iic_data 49 | }, 50 | { .vendor = OCP_VENDOR_IBM, 51 | .function = OCP_FUNC_GPIO, 52 | .paddr = GPIO0_BASE, 53 | .irq = OCP_IRQ_NA, 54 | .pm = IBM_CPM_GPIO0, 55 | }, 56 | { .vendor = OCP_VENDOR_INVALID 57 | } 58 | }; 59 | 60 | /* Polarity and triggering settings for internal interrupt sources */ 61 | struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = { 62 | { .polarity = 0xffff8f80, 63 | .triggering = 0x00000000, 64 | .ext_irq_mask = 0x0000707f, /* IRQ7 - IRQ9, IRQ0 - IRQ6 */ 65 | } 66 | }; 67 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/rtc_fpc/rtc_fpc_local.h: -------------------------------------------------------------------------------- 1 | //vulcan/drv/rtc_fpc/rtc_fpc_local.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | 23 | #ifndef RTC_FPC_LOCAL_H 24 | #define RTC_FPC_LOCAL_H 25 | 26 | #define IRQ_RTCFPC 0 27 | 28 | //Define the DCRs for the RTC/Front Panel Controller. 29 | #define DCR_RTC_FPC_CNTL 0x310 30 | #define DCR_RTC_FPC_INT 0x311 31 | #define DCR_RTC_FPC_TIME 0x312 32 | #define DCR_RTC_FPC_ALRM 0x313 33 | 34 | #define DCR_RTC_FPC_D1 0x314 35 | #define DCR_RTC_FPC_D2 0x315 36 | #define DCR_RTC_FPC_D3 0x316 37 | #define DCR_RTC_FPC_D4 0x317 38 | #define DCR_RTC_FPC_D5 0x318 39 | 40 | #define DCR_RTC_FPC_FCNTL 0x319 41 | #define DCR_RTC_FPC_BRT 0x31A 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/pvr_atom_dcr.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1998 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author : Ian Govett 22 | | Component : xp 23 | | File : pvr_atom_dcr.h 24 | | Purpose : definition of PVR DCR access 25 | | Changes : 26 | | 27 | | Date By Comments 28 | | --------- --- -------------------------------------------------------- 29 | | 30-Sep-01 LGH create 30 | | 31 | +----------------------------------------------------------------------------*/ 32 | 33 | #ifndef PVR_DCR 34 | #define PVR_DCR 35 | 36 | #include 37 | 38 | //DCR addres of the reg of PVR 39 | #define PVR_CONFIG_DCR 0x02c0 40 | #define PVR_START_DCR 0x02c1 41 | #define PVR_ADDR_DCR 0x02c4 42 | #define PVR_COUNT_DCR 0x02c7 43 | #define PVR_INT_DCR 0x02ca 44 | #define PVR_STAT_DCR 0x02cb 45 | #define PVR_INT_MASK_DCR 0x02ce 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/clip/clip_t.c: -------------------------------------------------------------------------------- 1 | #include /* We're doing kernel work */ 2 | #include /* Specifically, a module */ 3 | #include 4 | #include "clip.h" 5 | 6 | 7 | #ifdef MODULE 8 | MODULE_PARM(wait, "i"); 9 | MODULE_PARM_DESC(wait, 10 | "wait: 0-nowait, 1-wait"); 11 | 12 | MODULE_PARM(num, "i"); 13 | #endif 14 | 15 | int wait = 0; 16 | int num = 32; 17 | 18 | CLIPINFO info[32]; 19 | CLIPDEV_T clipdev; 20 | 21 | int clipt_ready() 22 | { 23 | printk("test ready\n"); 24 | return 1; 25 | } 26 | 27 | int clipt_write(CLIPINFO *info) 28 | { 29 | printk("test write to hw\n"); 30 | printk("start address = %ld\n", info->ulBufAdrOff); 31 | printk("len = %ld\n", info->ulBufLen); 32 | return 0; 33 | } 34 | 35 | int init_module() 36 | { 37 | int i; 38 | 39 | clipdev = clipdev_create(200, num, 40 | clipt_write,clipt_ready); 41 | if(clipdev == NULL) 42 | { 43 | printk("clip device init error\n"); 44 | return -1; 45 | } 46 | 47 | for( i =0; i < num; i++) 48 | { 49 | if(wait == 0) 50 | { 51 | if(clipdev_get_buf_nowait(clipdev, &info[i]) != 0) 52 | { 53 | printk("dequeue error\n"); 54 | } 55 | } 56 | else if(wait == 1) 57 | { 58 | if(clipdev_get_buf_wait(clipdev, &info[i]) != 0) 59 | { 60 | printk("dequeue error\n"); 61 | } 62 | } 63 | else 64 | return -1; 65 | 66 | printk("[%d], start = %ld, len = %ld\n", 67 | i, 68 | info[i].ulBufAdrOff, 69 | info[i].ulBufLen); 70 | } 71 | clipdev_dump(clipdev); 72 | return 0; 73 | } 74 | 75 | /* Cleanup - unregister the appropriate file from /proc */ 76 | void cleanup_module() 77 | { 78 | int i; 79 | printk("remove bufman\n"); 80 | for(i = 0; i < num; i++) 81 | { 82 | clipdev_clipinfo_done(clipdev); 83 | } 84 | if(clipdev) 85 | clipdev_delete(clipdev); 86 | } 87 | 88 | -------------------------------------------------------------------------------- /device_table_dev.txt: -------------------------------------------------------------------------------- 1 | # See package/makedevs/README for details 2 | # 3 | # This device table is used only to create device files when a static 4 | # device configuration is used (entries in /dev are static). 5 | # 6 | # 7 | 8 | # Normal system devices 9 | /dev/mem c 640 0 0 1 1 0 0 - 10 | /dev/kmem c 640 0 0 1 2 0 0 - 11 | /dev/null c 666 0 0 1 3 0 0 - 12 | /dev/zero c 666 0 0 1 5 0 0 - 13 | /dev/random c 666 0 0 1 8 0 0 - 14 | /dev/urandom c 666 0 0 1 9 0 0 - 15 | /dev/ram b 640 0 0 1 1 0 0 - 16 | /dev/ram b 640 0 0 1 0 0 1 4 17 | /dev/loop b 640 0 0 7 0 0 1 2 18 | /dev/rtc c 640 0 0 10 135 - - - 19 | /dev/console c 666 0 0 5 1 - - - 20 | /dev/tty c 666 0 0 5 0 - - - 21 | /dev/tty c 666 0 0 4 0 0 1 8 22 | /dev/ttyp c 666 0 0 3 0 0 1 10 23 | /dev/ptyp c 666 0 0 2 0 0 1 10 24 | /dev/ptmx c 666 0 0 5 2 - - - 25 | /dev/ttyP c 666 0 0 57 0 0 1 4 26 | /dev/ttyS c 666 0 0 4 64 0 1 4 27 | /dev/fb c 640 0 5 29 0 0 1 4 28 | #/dev/ttySA c 666 0 0 204 5 0 1 3 29 | /dev/psaux c 666 0 0 10 1 0 0 - 30 | #/dev/ppp c 666 0 0 108 0 - - - 31 | /dev/ttyAM c 666 0 0 204 16 0 1 3 32 | /dev/ttyCPM c 666 0 0 204 46 0 1 4 33 | /dev/ttyAMA c 666 0 0 204 64 0 1 4 34 | /dev/ttySAC c 666 0 0 204 64 0 1 4 35 | /dev/ttySC c 666 0 0 204 8 0 1 8 36 | /dev/ttyPSC c 666 0 0 204 148 0 1 4 37 | /dev/ttyUL c 666 0 0 204 187 0 1 4 38 | /dev/ttymxc c 666 0 0 207 16 0 1 4 39 | /dev/hvc c 640 0 0 229 0 0 1 4 40 | 41 | # Input stuff 42 | /dev/input d 755 0 0 - - - - - 43 | /dev/input/mice c 640 0 0 13 63 0 0 - 44 | /dev/input/mouse c 660 0 0 13 32 0 1 4 45 | /dev/input/event c 660 0 0 13 64 0 1 4 46 | #/dev/input/js c 660 0 0 13 0 0 1 4 47 | 48 | # MTD stuff 49 | /dev/mtd c 640 0 0 90 0 0 2 7 50 | /dev/mtdblock b 640 0 0 31 0 0 1 7 51 | 52 | # I2C device nodes 53 | /dev/i2c- c 666 0 0 89 0 0 1 4 54 | 55 | # DVB tuner 56 | /dev/dvb d 755 0 0 - - - - - 57 | /dev/dvb/adapter0 d 755 0 0 - - - - - 58 | /dev/dvb/adapter0/frontend0 c 660 0 0 212 3 - - - 59 | /dev/dvb/adapter0/demux0 c 660 0 0 212 4 - - - 60 | /dev/dvb/adapter0/dvr0 c 660 0 0 212 5 - - - 61 | /dev/dvb/adapter0/net0 c 660 0 0 212 7 - - - 62 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/gfx/osd_dcr.h: -------------------------------------------------------------------------------- 1 | //vulcan/drv/gfx/osd_dcr.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // DCR defination of of OSD controls 25 | //Revision Log: 26 | // Jun/04/2002 Created by YYD 27 | 28 | #ifndef _DRV_GFX_OSD_DCR_H_INC_ 29 | #define _DRV_GFX_OSD_DCR_H_INC_ 30 | 31 | #include "os/os-io.h" 32 | 33 | #define DCR_VID0_OSD_MODE (0x0151) // display control register 34 | #define DCR_VID0_GSLA (0x0159) // graphics start link register 35 | #define DCR_VID0_ISLA (0x015a) // image start link register 36 | #define DCR_VID0_CSLA (0x015c) // cursor start link register 37 | #define DCR_VID0_IPBASE (0x016d) // image layer OSD base address 38 | #define DCR_VID0_GPBASE (0x016e) // graphics layer OSD base address 39 | #define DCR_VID0_CPBASE (0x017a) // cursor layer OSD base address 40 | #define DCR_VID0_DISP_MODE (0x0154) 41 | 42 | #endif // _DRV_GFX_OSD_DCR_H_INC_ 43 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/xp_osi_pcr.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1999 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author: Tony J. Cerreto 22 | | Component: XP 23 | | File: xp_pcr.h 24 | | Purpose: Common definitions for xp_pcr.c functions. 25 | | 26 | | Changes: 27 | | Date: Author Comment: 28 | | --------- ------ -------- 29 | | 19-Dec-99 TJC Created. 30 | | 30-Sep-01 LGH Ported to Linux 31 | +----------------------------------------------------------------------------*/ 32 | #ifndef _xp_pcr_h_ 33 | #define _xp_pcr_h_ 34 | 35 | 36 | 37 | /*----------------------------------------------------------------------------+ 38 | | Prototype Definitions 39 | +----------------------------------------------------------------------------*/ 40 | void xp_osi_pcr_delay(unsigned long delay); 41 | 42 | void xp_osi_pcr_sync(); 43 | 44 | void xp_osi_pcr_sync_start(); 45 | 46 | void xp_osi_pcr_sync_stop(); 47 | 48 | int xp_osi_pcr_init(GLOBAL_RESOURCES *pGlobal0); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/ir/README: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------- 2 | | IR Driver for Redwood 5 (Linux Edition) version 1.0 | 3 | ----------------------------------------------------------------------- 4 | 5 | 0. What is new 6 | 7 | Version 1.0 Apr/17/2002 8 | "code copy & paste editing bug" fixed. 9 | Enabled RAW capture mode of remote control as an option 10 | 11 | Version 0.1 Sept/29/2001 12 | The first release of the IR driver built on new architecture. 13 | 14 | 15 | 1. Introduction 16 | 17 | This is the first release of the IR driver for Linux. In this release, we support 18 | the following IR devices: 19 | 20 | IR Remote Controllers 21 | Cinema 7 IR controller in Hitachi mode 22 | IR Keyboard / Mouse 23 | Acer infrared keyboard (Model No: WIL-14M, Revision No: 1.5) 24 | (Support of this device depends on the linux general keyboard driver and 25 | generic busmouse driver interface) 26 | 27 | 2.Requirement 28 | The driver is dependent on the stbkb driver and generic busmouse support, which 29 | should be compiled into the kernel. 30 | 31 | 3.Installation 32 | Modify Makefile and make changes according to your config. 33 | 34 | There are two compiling options can be defined in LOCAL_CFLAGS 35 | _IR_MOUSE_SUPPORT Define this to enable Acer keyboard mouse pad support. 36 | _IR_RAWMODE_ Define this to enable capturing of all remote controll 37 | codes without filtering and translating 38 | **** This is not compatible with old applications **** 39 | 40 | 41 | 42 | In the current directory, type these commands, 43 | 44 | $make 45 | $make install 46 | 47 | On target platform : 48 | cd /dev 49 | mknod irmouse c 10 11 50 | ln -sf irmouse mouse 51 | mknod rawir c 100 0 52 | 53 | 54 | then driver can be loaded. 55 | 56 | A example using the IR remote controller device can be found under the `test' subdir. 57 | It is also installed by `make install' to the target platform as `tstrawir'. 58 | 59 | 60 | 4.Limitation 61 | 62 | ------------------------------------------------------------------------------- 63 | 64 | 65 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/os/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # os_core makefile 3 | #################################################################################### 4 | 5 | include ../config.local 6 | 7 | 8 | OBJS := os_inf.o helper-queue.o helper-pool.o os-interrupt.o os-sync.o pm-alloc.o os_alloc.o ../gpt/gpt_atom.o 9 | 10 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 11 | 12 | LOCAL_TARGET := os_core.o 13 | 14 | 15 | all: $(LOCAL_TARGET) 16 | 17 | %.o: %.c 18 | $(CC) $(BASE_MODCFLAGS) -c -o $@ $< 19 | 20 | $(LOCAL_TARGET) : $(OBJS) 21 | $(LD) -m elf32ppclinux -r -o $@ $(OBJS) 22 | # $(STRIP) $@ 23 | 24 | helper-queue.o : helper-queue.c helper-queue-local.h \ 25 | $(COMMONHEADERS) \ 26 | $(DRV_INCLUDE_DIR)/os/helper-queue.h \ 27 | $(DRV_INCLUDE_DIR)/os/os-generic.h 28 | 29 | helper-pool.o : helper-pool.c helper-pool-local.h \ 30 | $(COMMONHEADERS) \ 31 | $(DRV_INCLUDE_DIR)/os/helper-pool.h \ 32 | $(DRV_INCLUDE_DIR)/os/os-generic.h 33 | 34 | 35 | os-interrupt.o : os-interrupt.c os-interrupt-local.h \ 36 | $(COMMONHEADERS) \ 37 | $(DRV_INCLUDE_DIR)/os/os-interrupt.h 38 | 39 | os-sync.o : os-sync.c \ 40 | $(COMMONHEADERS) \ 41 | $(DRV_INCLUDE_DIR)/os/os-sync.h 42 | 43 | pm-alloc.o : pm-alloc.c pm-alloc-local.h \ 44 | $(COMMONHEADERS) \ 45 | $(DRV_INCLUDE_DIR)/os/pm-alloc.h \ 46 | $(DRV_INCLUDE_DIR)/hw/physical-mem.h 47 | 48 | os_alloc.o : os_alloc.c \ 49 | $(COMMONHEADERS) \ 50 | $(DRV_INCLUDE_DIR)/os/pm-alloc.h \ 51 | $(DRV_INCLUDE_DIR)/hw/physical-mem.h 52 | 53 | gpt_atom.o : ../gpt/gpt_atom.c \ 54 | $(COMMONHEADERS) \ 55 | $(DRV_INCLUDE_DIR)/os/os-io.h \ 56 | $(DRV_INCLUDE_DIR)/gpt/gpt_ports.h 57 | 58 | .PHONY : clean 59 | 60 | clean : 61 | rm -f $(OBJS) $(LOCAL_TARGET) 62 | 63 | test_apps: 64 | 65 | install : $(LOCAL_TARGET) 66 | @if [ ! -d $(INSTALL_ROOT)/lib/modules/$(VER)/misc ] ; then \ 67 | echo "Creating target directory : " $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 68 | mkdir -p $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 69 | fi 70 | install $(LOCAL_TARGET) $(INSTALL_ROOT)/lib/modules/$(VER)/misc 71 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/scp/scp_osi.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1997, 1999, 2001, 2003 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author: Mark Detrick 22 | | Component: scp 23 | | File: scp_osi.h 24 | | Purpose: OS independant functions for serial control port 25 | | Changes: 26 | | 27 | | Date: Author Comment: 28 | | ---------- ---------------- ----------------------------------------------- 29 | | 09/19/2003 MSD Created. 30 | +----------------------------------------------------------------------------*/ 31 | 32 | #ifndef _scp_osi_h_ 33 | #define _scp_osi_h_ 34 | 35 | int scp_osi_display_regs(); 36 | int scp_osi_get_cmd(unsigned long *p_value); 37 | int scp_osi_set_cmd(unsigned long value); 38 | int scp_osi_get_reverse_data(unsigned long *p_value); 39 | int scp_osi_set_reverse_data(unsigned long value); 40 | int scp_osi_get_clock_invert(unsigned long *p_value); 41 | int scp_osi_set_clock_invert(unsigned long value); 42 | int scp_osi_get_loopback(unsigned long *p_value); 43 | int scp_osi_set_loopback(unsigned long value); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/ir/ir_osi_device.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/include/osi_irdevice.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // OS Independent IR device driver 25 | //Revision Log: 26 | // Sept/10/2001 Created by YYD 27 | 28 | #ifndef _DRV_INCLUDE_OSI_IRDEVICE_H_INC_ 29 | #define _DRV_INCLUDE_OSI_IRDEVICE_H_INC_ 30 | 31 | #include "os/os-types.h" 32 | 33 | #define _IR_SAMPLE_CLOCK 500000 34 | 35 | typedef struct __IR_DEVICE_CHAIN_STRUCT_ 36 | { 37 | INT (*init)(void); // calls when ir device is being initlized 38 | void (*deinit)(void); // calls when ir device is being deinitilized 39 | void (*event)(UINT32 time_diff); // calls when there is an ir event 40 | 41 | // private 42 | struct __IR_DEVICE_CHAIN_STRUCT_ *pNext; 43 | } __IR_DEVICE; 44 | 45 | 46 | INT ir_osi_register_device(__IR_DEVICE *pDev); 47 | INT ir_osi_unregister_device(__IR_DEVICE *pDev); 48 | 49 | INT ir_osi_init(void); // requires GPT atom device been initialized 50 | 51 | INT ir_osi_deinit(void); 52 | 53 | INT ir_osi_start(void); 54 | 55 | INT ir_osi_stop(void); 56 | 57 | #endif // _DRV_INCLUDE_OSI_IRDEVICE_H_INC_ 58 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/os/os-types.h: -------------------------------------------------------------------------------- 1 | //vulcan/drv/include/os/os-types.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // A common architecture independent type defs 25 | //Revision Log: 26 | // Aug/31/2001 Created by YYD 27 | 28 | #ifndef _DRV_INCLUDE_OS_OS_TYPES_H_INC_ 29 | #define _DRV_INCLUDE_OS_OS_TYPES_H_INC_ 30 | 31 | 32 | // Architecture specific 33 | typedef int INT; 34 | typedef unsigned int UINT; 35 | 36 | typedef short int SHORT; 37 | typedef unsigned short int USHORT; 38 | 39 | typedef unsigned char BYTE; 40 | typedef unsigned char UCHAR; 41 | typedef signed char SBYTE; 42 | 43 | typedef long LONG; 44 | typedef unsigned long ULONG; 45 | 46 | 47 | //try to be architecture independent 48 | // for PPC 4xx, the following is true 49 | typedef signed char INT8; 50 | typedef unsigned char UINT8; 51 | 52 | typedef short int INT16; 53 | typedef unsigned short int UINT16; 54 | 55 | typedef int INT32; 56 | typedef unsigned int UINT32; 57 | 58 | // only gcc support these 59 | typedef long long int INT64; 60 | typedef unsigned long long int UINT64; 61 | 62 | #define INLINE inline 63 | 64 | #endif // _DRV_INCLUDE_OS_OS_TYPES_H_INC_ 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/ir/test/tstrawir.c: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | 3 | | This source code has been made available to you by IBM on an AS-IS 4 | | basis. Anyone receiving this source is licensed under IBM 5 | | copyrights to use it in any way he or she deems fit, including 6 | | copying it, modifying it, compiling it, and redistributing it either 7 | | with or without modifications. No license under IBM patents or 8 | | patent applications is to be implied by the copyright license. 9 | | 10 | | Any user of this software should understand that IBM cannot provide 11 | | technical support for this software and will not be responsible for 12 | | any consequences resulting from the use of this software. 13 | | 14 | | Any person who transfers this source code or any derivative work 15 | | must include the IBM copyright notice, this paragraph, and the 16 | | preceding two paragraphs in the transferred software. 17 | | 18 | | COPYRIGHT I B M CORPORATION 1998 19 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 20 | +----------------------------------------------------------------------------*/ 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | main() 28 | { 29 | struct pollfd ufds; 30 | int fd, ret; 31 | fd = open("/dev/rawir", O_RDONLY|O_NONBLOCK); 32 | if(fd < 0) { 33 | printf("What's wrong with the device driver /dev/rawir ?\n"); 34 | } 35 | 36 | 37 | ufds.fd = fd; 38 | ufds.events = POLLIN; 39 | 40 | printf("Press power off to quit test, other keys to test .\n"); fflush(stdout); 41 | while(1) { 42 | ret = poll(&ufds, 1, 5000); 43 | if (ret){ 44 | printf("poll down\n"); fflush(stdout); 45 | if (ufds.revents & POLLIN){ /* rawir*/ 46 | short int cmd; 47 | int cnt = read(fd, (void*)&cmd, 2); 48 | if(cnt <= 0) { 49 | printf("Poll returned without key!\n"); fflush(stdout); 50 | } 51 | else 52 | { 53 | printf("KeyCode = 0x%04x\n", cmd); fflush(stdout); 54 | if(cmd == 266 || cmd == 261) break; 55 | } 56 | } 57 | } 58 | else { 59 | printf("poll timeout\n"); fflush(stdout); 60 | } 61 | } 62 | close(fd); 63 | } 64 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/sci/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # sci makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := sci_drv.o 6 | LOCAL_TEST := scit 7 | 8 | include ../config.local 9 | 10 | OBJS := sci_inf.o sci_osd.o sci_osi.o sci_atom.o 11 | 12 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 13 | 14 | all: $(LOCAL_TARGET) $(LOCAL_TEST) 15 | 16 | %.o: %.c 17 | $(CC) $(BASE_MODCFLAGS) -D__DRV_DEBUG -c -o $@ $< 18 | 19 | 20 | %.o: %.c 21 | $(CC) $(BASE_MODCFLAGS) -c -o $@ $< 22 | 23 | $(LOCAL_TARGET) : $(OBJS) 24 | $(LD) -m elf32ppclinux -r -o $@ $(OBJS) 25 | # $(STRIP) $@ 26 | 27 | sci_inf.o : sci_inf.c sci_osi.h \ 28 | $(COMMONHEADERS) \ 29 | $(DRV_INCLUDE_DIR)/sci/sci_inf.h \ 30 | $(DRV_INCLUDE_DIR)/sci/sci_global.h 31 | 32 | sci_osd.o : sci_osd.c sci_osd.h sci_osi.h sci_atom.h \ 33 | $(COMMONHEADERS) \ 34 | $(DRV_INCLUDE_DIR)/os/os-interrupt.h \ 35 | $(DRV_INCLUDE_DIR)/os/os-sync.h \ 36 | $(DRV_INCLUDE_DIR)/sci/sci_global.h 37 | 38 | sci_osi.o : sci_osi.c sci_osi.h sci_atom.h \ 39 | $(COMMONHEADERS) \ 40 | $(DRV_INCLUDE_DIR)/os/os-interrupt.h \ 41 | $(DRV_INCLUDE_DIR)/os/os-sync.h \ 42 | $(DRV_INCLUDE_DIR)/sci/sci_global.h 43 | 44 | sci_atom.o : sci_atom.c sci_atom.h \ 45 | $(COMMONHEADERS) \ 46 | $(DRV_INCLUDE_DIR)/sci/sci_global.h 47 | 48 | 49 | .PHONY : clean 50 | 51 | test_apps: $(LOCAL_TEST) 52 | 53 | $(LOCAL_TEST) : test/mu_sci.c test/sci_prot.c 54 | # $(DRV_INCLUDE_DIR)/sci/sci_inf.h \ 55 | # $(DRV_INCLUDE_DIR)/sci/sci_global.h 56 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(DRV_INCLUDE_DIR) -o $@ $^ 57 | 58 | 59 | clean : 60 | rm -f $(OBJS) $(LOCAL_TARGET) $(LOCAL_TEST) *.o 61 | 62 | install : $(LOCAL_TARGET) $(LOCAL_TEST) 63 | @if [ ! -d $(INSTALL_ROOT)/lib/modules/$(VER)/misc ] ; then \ 64 | echo "Creating target directory : " $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 65 | mkdir -p $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 66 | fi 67 | install $(LOCAL_TARGET) $(INSTALL_ROOT)/lib/modules/$(VER)/misc 68 | @if [ ! -d $(LOCALBIN_DIR) ] ; then \ 69 | echo "Creating target directory : " $(LOCALBIN_DIR) ; \ 70 | mkdir -p $(LOCALBIN_DIR) ; \ 71 | fi 72 | install $(LOCAL_TEST) $(LOCALBIN_DIR) 73 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/os/os-generic.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/include/os/os-generic.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // A common OS abstraction interface for Linux 25 | //Revision Log: 26 | // Sept/03/2001 Created by YYD 27 | // Sept/28/2001 Add _OS_MEM helper, YYD 28 | 29 | #ifndef _DRV_INCLUDE_OS_OS_GENERIC_H_INC_ 30 | #define _DRV_INCLUDE_OS_OS_GENERIC_H_INC_ 31 | 32 | #include "os/os-types.h" 33 | 34 | #include 35 | #include // where kmalloc is defined ?? 36 | #include // where in_interrupt defined 37 | 38 | #define MALLOC(s) kmalloc((s), in_interrupt() ? GFP_ATOMIC : GFP_KERNEL) 39 | #define FREE(s) kfree((s)) 40 | 41 | #include 42 | 43 | #define _OS_MEMCPY(a,b,c) memcpy(a,b,c) 44 | #define _OS_MEMMOVE(a,b,c) memmove(a,b,c) 45 | #define _OS_MEMSET(a,b,c) memset(a,b,c) 46 | 47 | 48 | void * _OS_MAP_PHYSICAL_MEM(UINT uPhyAddr, UINT uSize); 49 | // return NULL for fail and logical address on success 50 | 51 | INT _OS_UNMAP_PHYSICAL_MEM(UINT uPhyAddr, void *pLogicalAddr); 52 | // return -1 on fail, 0 on success 53 | 54 | 55 | #endif // _DRV_INCLUDE_OS_OS_GENERIC_H_INC_ 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/vid/vid_osi_scr.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1997, 1999, 2001 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author: Ling shao 22 | | File: vid_osi_scr.h 23 | | Purpose: scrman osi layer PALLAS 24 | | Changes: 25 | | Date: Comment: 26 | | ----- -------- 27 | | 15-Oct-01 create SL 28 | +----------------------------------------------------------------------------*/ 29 | #ifndef PALLAS_SCRMAN_OSI_H 30 | #define PALLAS_SCRMAN_OSI_H 31 | #include 32 | #include 33 | 34 | #include "vid_atom_denc.h" 35 | 36 | #define DENC_INTERNAL 0 37 | #define DENC_EXTERNAL 1 38 | 39 | #define SCRMAN_FMT_NTSC DENC_MODE_NTSC // YYD 40 | #define SCRMAN_FMT_PAL DENC_MODE_PAL // YYD 41 | 42 | #define DEFAULT_INTER_DENC0_OUTFMT DENC_OUTFMT_LC 43 | #define DEFAULT_INTER_DENC1_OUTFMT DENC_OUTFMT_CVBS 44 | 45 | INT scrman_osi_init(); 46 | INT scrman_osi_set_fmt(DENC_MODE mode); 47 | INT scrman_osi_set_output(DENC_OUTFMT fmt); 48 | INT scrman_osi_colorbar_on(); 49 | INT scrman_osi_colorbar_off(); 50 | UINT scrman_osi_get_denc_id(); 51 | UINT scrman_osi_get_fmt(); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/gfx/osd_local.h: -------------------------------------------------------------------------------- 1 | //vulcan/drv/gfx/osd_local.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // Common defines of OSD functions 25 | //Revision Log: 26 | // Sept/28/2001 Created by YYD 27 | 28 | #ifndef _DRV_GFX_OSD_LOCAL_H_INC_ 29 | #define _DRV_GFX_OSD_LOCAL_H_INC_ 30 | 31 | #include "os/os-types.h" 32 | #include "gfx_surface.h" 33 | 34 | // defines osd planer configs 35 | 36 | // to distinguish field applicables 37 | // z/Z : not used 38 | // c/C : cursor plane 39 | // g/G : graphics plane 40 | // s/S : still plane 41 | // b/B : back ground plane 42 | // a/A : all plane 43 | 44 | 45 | #define OSD_PLANE_MAX_DIMENSIONS (0x1fff) 46 | #define OSD_CURSOR_POSITION_RANGE (0x3ff) 47 | 48 | #define OSD_PLANE_GRAPHICS GFX_COMP_OSDGFX 49 | #define OSD_PLANE_CURSOR GFX_COMP_OSDCUR 50 | #define OSD_PLANE_IMAGE GFX_COMP_OSDIMG 51 | 52 | #define OSD_PLANE_MAX_SUBPLANES GFX_SURFACE_MAX_SUBPLANES 53 | 54 | #define OSD_PLANE_ONE_SUBPLANE GFX_SURFACE_ONE_SUBPLANE 55 | #define OSD_PLANE_TWO_SUBPLANE GFX_SURFACE_TWO_SUBPLANE 56 | #define OSD_PLANE_THREE_SUBPLANE GFX_SURFACE_THREE_SUBPLANE 57 | 58 | #endif // _DRV_GFX_OSD_LOCAL_H_INC_ 59 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/pvr_osi.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1998 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author : Ian Govett 22 | | Component : xp 23 | | File : pvr_osi.h 24 | | Purpose : header file for PVR os independent function 25 | | Changes : 26 | | 27 | | Date By Comments 28 | | --------- --- -------------------------------------------------------- 29 | | 10-Oct-01 LGH Created 30 | +----------------------------------------------------------------------------*/ 31 | #ifndef PVR_OSI 32 | #define PVR_OSI 33 | 34 | #define PVR_DMA_COMPLETE 0x1 35 | 36 | typedef enum pvr_playback_mode_t 37 | { 38 | PLAYBACK_WORD = 0, 39 | PLAYBACK_LINE 40 | } PVR_PLAYBACK_MODE; 41 | 42 | typedef struct pvr_status_t 43 | { 44 | int BufEmpty; 45 | int BufFull; 46 | } PVR_STATUS; 47 | 48 | int pvr_osi_playback_deconfig(void); 49 | int pvr_osi_playback_config(void); 50 | int pvr_osi_playback_start(PVR_PLAYBACK_MODE mode); 51 | int pvr_osi_playback_stop(void); 52 | int pvr_osi_set_dma(ULONG addr,USHORT uwCount); 53 | int pvr_osi_get_status(PVR_STATUS *pPvrStatus); 54 | void pvr_osi_flush(); 55 | void pvr_osi_unflush(void); 56 | 57 | void pvr_osi_set_vid(ULONG reg1); 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/os/helper-pool.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/include/os/helper-pool.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // Common Pool helper routines 25 | //Revision Log: 26 | // Sept/26/2001 Created by YYD 27 | 28 | #ifndef _DRV_INCLUDE_OS_HELPER_POOL_H_INC_ 29 | #define _DRV_INCLUDE_OS_HELPER_POOL_H_INC_ 30 | 31 | #include "os-types.h" 32 | 33 | typedef struct __OS_POOL_STRUCTURE_ 34 | { 35 | void *pBuffer; 36 | void *pPoolHead; 37 | UINT uFreeElements; 38 | UINT uElements; 39 | UINT uElementSize_plus_pointer; 40 | UINT uAttr; // internel attribute 41 | } POOL_T; 42 | 43 | #define os_tell_pool_buffer_size(uElements, uElementSize) \ 44 | ((UINT)(uElements)*((UINT)(uElementSize)+sizeof(void *))) 45 | 46 | INT os_create_pool (POOL_T *pPool, void *pBuffer, UINT uElements, UINT uElementSize); 47 | 48 | void * os_get_from_pool (POOL_T *pPool); 49 | 50 | INT os_put_back_to_pool(POOL_T *pPool, void *pElement); 51 | 52 | INT os_delete_pool (POOL_T *pPool); 53 | 54 | INT os_get_pool_status(POOL_T *pPool); 55 | 56 | INT os_validate_pool_element(POOL_T *pPool, void *pElement); 57 | 58 | void * os_walk_up_pool(POOL_T *pPool, UINT uWhichElement); 59 | 60 | #endif // _DRV_INCLUDE_OS_HELPER_QUEUE_H_INC_ 61 | 62 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/os/os-interrupt-local.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | 3 | | This source code has been made available to you by IBM on an AS-IS 4 | | basis. Anyone receiving this source is licensed under IBM 5 | | copyrights to use it in any way he or she deems fit, including 6 | | copying it, modifying it, compiling it, and redistributing it either 7 | | with or without modifications. No license under IBM patents or 8 | | patent applications is to be implied by the copyright license. 9 | | 10 | | Any user of this software should understand that IBM cannot provide 11 | | technical support for this software and will not be responsible for 12 | | any consequences resulting from the use of this software. 13 | | 14 | | Any person who transfers this source code or any derivative work 15 | | must include the IBM copyright notice, this paragraph, and the 16 | | preceding two paragraphs in the transferred software. 17 | | 18 | | COPYRIGHT I B M CORPORATION 1998 19 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 20 | +----------------------------------------------------------------------------*/ 21 | #ifndef PALLAS_OS_INTERRUPT_LOCAL_H 22 | #define PALLAS_OS_INTERRUPT_LOCAL_H 23 | 24 | #include /*for struct pt_regs*/ 25 | 26 | typedef struct tagTask 27 | { 28 | UINT uIrq; //interrupt number this task attaching 29 | void (*irq_task)(QUEUE_T *pQueue); //task function 30 | UINT uMsgSize; //size of each message 31 | QUEUE_T Queue; //msg queue of this task 32 | UINT uQueueFlag; //queue flag 0: clear 1: initialized 33 | INT nActiveNum; //active task count 34 | #ifdef LINUX 35 | struct tq_struct task; //linux task queue structure 36 | #endif 37 | } TASK; 38 | 39 | typedef struct tagIRQ 40 | { 41 | UINT uIrq; //interrupt number 42 | UINT uAttr; //interrupt attribute 43 | INT nCount; //invoked interrupt count 44 | void (*handler)(UINT uIrq, void *pData); //interrupt handler 45 | void *pData; //parameter for handler 46 | UINT uTaskFlag; //uTaskFlag = 1 task attached, uTaskFlag = 0 no task attached 47 | TASK task; //attached task 48 | MUTEX_T mutex; //mutex of task operation 49 | }IRQ; 50 | 51 | void os_irq_standard_handler(int irq, void* dev_id, struct pt_regs *regs); 52 | void os_standard_task(void *pData); 53 | void os_irq_clear(IRQ *pIrq); 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/os/os-sync.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/include/os/os-sync.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // Protytypes of OS independent syncronization helper functions 25 | //Revision Log: 26 | // Sept/06/2001 Created by YYD 27 | 28 | #ifndef _DRV_INCLUDE_OS_OS_SYNC_H_INC_ 29 | #define _DRV_INCLUDE_OS_OS_SYNC_H_INC_ 30 | 31 | #include "os-types.h" 32 | 33 | typedef void* SEMAPHORE_T; 34 | 35 | SEMAPHORE_T os_create_semaphore(UINT uInitialValue); 36 | INT os_wait_semaphore(SEMAPHORE_T semaphore, INT nTimeout); 37 | INT os_try_wait_semaphore(SEMAPHORE_T semaphore, INT nTimeout); 38 | void os_post_semaphore(SEMAPHORE_T semaphore); 39 | void os_delete_semaphore(SEMAPHORE_T semaphore); 40 | 41 | 42 | typedef void* MUTEX_T; 43 | 44 | MUTEX_T os_create_mutex (void); 45 | INT os_get_mutex(MUTEX_T mutex); 46 | INT os_try_get_mutex(MUTEX_T mutex); 47 | void os_release_mutex(MUTEX_T mutex); 48 | void os_delete_mutex(MUTEX_T mutex); 49 | 50 | UINT32 os_enter_critical_section(); 51 | void os_leave_critical_section(UINT32 flags); 52 | 53 | void os_sleep(ULONG ticks); //1tick = 10ms 54 | void os_delay(ULONG usecs); //1usec = 1us 55 | void os_cpu_clock_delay(ULONG clocks); //wait cpu clocks 56 | 57 | #endif // _DRV_INCLUDE_OS_OS_SYNC_H_INC_ 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/gfx/test/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # gfxtest makefile 3 | #################################################################################### 4 | 5 | ## Uncomment this to enable support of freetype 2 font rendering in gfxfont.c 6 | #FREETYPE2_SUPPORT := freetype2 7 | 8 | ## Uncomment this to enable libjpeg support in gfxbmp.c 9 | #JPEG_LIB_READY := -D__JPEG_LIB_READY__ 10 | 11 | 12 | ifdef FREETYPE2_SUPPORT 13 | FREETYPE2_LIB := $(FREETYPE2_SUPPORT)/lib/libfreetype.a 14 | FREETYPE2_INCLUDE := $(FREETYPE2_SUPPORT)/include 15 | else 16 | FREETYPE2_LIB := 17 | FREETYPE2_INCLUDE := 18 | endif 19 | 20 | ifdef JPEG_LIB_READY 21 | 22 | JPEG_LIB_LINK := -ljpeg 23 | 24 | endif 25 | 26 | 27 | 28 | LOCAL_TARGET := gfxlib.a 29 | 30 | LOCAL_TEST := gfxtester 31 | 32 | 33 | include ../../config.local 34 | 35 | ifdef FREETYPE2_SUPPORT 36 | 37 | OBJS := gfxlib.o gfxbmp.o gfxdraw.o gfxfont.o 38 | 39 | gfxtest : gfxtest.c $(LOCAL_TARGET) 40 | $(CC) -I$(DRV_INCLUDE_DIR) -DFREETYPE2_SUPPORT -lm $(JPEG_LIB_LINK) -o $@ $^ $(FREETYPE2_LIB) 41 | 42 | af_test : af_test.c $(LOCAL_TARGET) 43 | $(CC) -I$(DRV_INCLUDE_DIR) -DFREETYPE2_SUPPORT -o $@ $^ $(FREETYPE2_LIB) 44 | 45 | else 46 | 47 | OBJS := gfxlib.o gfxbmp.o gfxdraw.o 48 | gfxtest : gfxtest.c $(LOCAL_TARGET) 49 | $(CC) -I$(DRV_INCLUDE_DIR) -lm $(JPEG_LIB_LINK) -o $@ $^ 50 | 51 | af_test : af_test.c $(LOCAL_TARGET) 52 | $(CC) -I$(DRV_INCLUDE_DIR) -o $@ $^ 53 | 54 | endif 55 | 56 | all: $(LOCAL_TARGET) $(LOCAL_TEST) 57 | 58 | .PHONY : clean 59 | 60 | test_apps: $(LOCAL_TEST) 61 | 62 | %.o : %.c 63 | $(CC) -c -I$(DRV_INCLUDE_DIR) $(JPEG_LIB_READY) -o $@ $< 64 | $(LOCAL_TARGET) : $(OBJS) 65 | $(AR) rc $@ $^ 66 | 67 | gfxlib.o : gfxlib.c gfxlib.h 68 | 69 | gfxbmp.o : gfxbmp.c gfxlib.h 70 | 71 | gfxdraw.o : gfxdraw.c gfxlib.h 72 | 73 | gfxfont.o : gfxfont.c gfxlib.h 74 | $(CC) -c -I$(FREETYPE2_INCLUDE) -I$(DRV_INCLUDE_DIR) -o $@ $< 75 | 76 | 77 | $(LOCAL_TEST) : gfxtest fbtest af_test 78 | 79 | 80 | fbtest : fbtest.c 81 | $(CC) -I$(DRV_INCLUDE_DIR) -o $@ $^ 82 | 83 | 84 | clean : 85 | rm -f $(OBJS) $(LOCAL_TARGET) fbtest gfxtest af_test *.o *.a 86 | 87 | install : $(LOCAL_TEST) 88 | @if [ ! -d $(LOCALBIN_DIR) ] ; then \ 89 | echo "Creating target directory : " $(LOCALBIN_DIR) ; \ 90 | mkdir -p $(LOCALBIN_DIR) ; \ 91 | fi 92 | install gfxtest $(LOCALBIN_DIR) 93 | install fbtest $(LOCALBIN_DIR) 94 | install af_test $(LOCALBIN_DIR) 95 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/hw/hardware.h: -------------------------------------------------------------------------------- 1 | //drv/include/hw/hardware.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // Hardware defination of IBM STB controller 25 | //Revision Log: 26 | // Oct/12/2001 Created by YYD 27 | // Jun/28/2002 Added defination for platform id YYD 28 | // Nov/13/2002 Added defination for cache line size YYD 29 | 30 | #ifndef _DRV_INCLUDE_HW_HARDWARE_H_INC_ 31 | #define _DRV_INCLUDE_HW_HARDWARE_H_INC_ 32 | 33 | #define __STB_SYS_CLK (63000000) // 63MHz SYS_CLK of Vulcan 34 | #define __TMRCLK (27000000) // 27MHz hardware timer 35 | 36 | #include "os/os-io.h" // for MF_SPR 37 | 38 | #define SPR_PVR (0x3e8) 39 | #define SPR_TBL (0x10C) 40 | 41 | #define GET_PPC_VERSION() MF_SPR(SPR_PVR) 42 | 43 | #define PPC_PALLAS_PBA (0x41810890) // initial release of pallas 44 | #define PPC_PALLAS_PBB (0x418108d1) // pallas 2 45 | #define PPC_VESTA (0x40310083) // Vesta PBE 46 | #define PPC_VULCAN_PBA (0x40000000) // unknown currently 47 | 48 | #define PPC_STB_CACHE_LINE_SIZE 32 49 | 50 | //#define __DRV_FOR_PALLAS__ // defined for Pallas driver 51 | #define __DRV_FOR_VULCAN__ // defined for Vulcan driver 52 | //#define __DRV_FOR_VESTA__ // defined for Vesta driver 53 | #endif // _DRV_INCLUDE_HW_HARDWARE_H_INC_ 54 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/ttx/powerpc.c: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | IBM CONFIDENTIAL 18 | | STB025XX VXWORKS EVALUATION KIT SOFTWARE 19 | | (C) COPYRIGHT IBM CORPORATION 2003 20 | +----------------------------------------------------------------------------*/ 21 | /*----------------------------------------------------------------------------+ 22 | | Author : Tony J. Cerreto 23 | | Component : TTX 24 | | File : powerpc.c 25 | | Purpose : Teletext Driver PowerPC Stub functions. 26 | | Changes : 27 | | 28 | | Date: By Comment: 29 | | --------- --- -------- 30 | | 22-Sep-03 TJC Created 31 | +----------------------------------------------------------------------------*/ 32 | #include 33 | #include 34 | #ifdef MODVERSIONS 35 | #include 36 | #endif 37 | #define __NO_VERSION__ 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include "powerpc.h" 44 | 45 | /*----------------------------------------------------------------------------+ 46 | | VxWorks Equivalent Functions in Linux 47 | +----------------------------------------------------------------------------*/ 48 | unsigned long beginCriticalSection(void) 49 | { 50 | return(os_enter_critical_section()); 51 | } 52 | 53 | void endCriticalSection(unsigned long crit) 54 | { 55 | os_leave_critical_section(crit); 56 | return; 57 | } 58 | 59 | unsigned long xp0_dcr_read(unsigned long address) 60 | { 61 | powerpcMtxpt0_lr(address); 62 | return(powerpcMfxpt0_dt()); 63 | } 64 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/sci/test/mu_sci.h: -------------------------------------------------------------------------------- 1 | /*-----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 2001 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +-----------------------------------------------------------------------------*/ 20 | /*-----------------------------------------------------------------------------+ 21 | | Author: Mike Lepore 22 | | Component: sci 23 | | File: mu_sci.h 24 | | Purpose: Smart Card menu application header file. 25 | | Changes: 26 | | 27 | | Date: Author Comment: 28 | | ---------- ---------------- ----------------------------------------------- 29 | | 03/22/2001 MAL Initial check-in. 30 | | 03/26/2001 Zongwei Liu Port to Linux 31 | | 09/26/2001 zongwei Liu Port to pallas 32 | +----------------------------------------------------------------------------*/ 33 | 34 | #ifndef mu_sci_h_ 35 | #define mu_sci_h_ 36 | 37 | SCI_ERROR sci_test(unsigned long sci_id, char *cmd); 38 | SCI_ERROR select_file(unsigned long sci_id); 39 | SCI_ERROR read_record(unsigned long sci_id); 40 | SCI_ERROR update_record(unsigned long sci_id); 41 | SCI_ERROR loop(unsigned long sci_id); 42 | void print_error(char *fn_name, int error_code); 43 | 44 | void pps(unsigned long sci_id); 45 | void get_ATR_parms(unsigned long sci_id); 46 | void get_parms(unsigned long sci_id); 47 | void set_parms(unsigned long sci_id); 48 | void get_ifsd(unsigned long sci_id); 49 | void set_ifsd(unsigned long sci_id); 50 | void get_modes(unsigned long sci_id); 51 | void set_modes(unsigned long sci_id); 52 | 53 | #endif /* _mu_sci_h_ */ 54 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # demux makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := demux.o 6 | LOCAL_TEST := test_av test_rec_ts test_pvr test_rec_pes 7 | 8 | include ../config.local 9 | 10 | 11 | OBJS := xp_osd_inf.o xp_osd_drv.o xp_osi.o xp_osi_chann.o xp_osi_clk.o xp_atom_dcr.o \ 12 | xp_osi_filte.o xp_osi_inter.o xp_osi_key.o xp_osi_queue.o xp_osi_pcr.o xp_osi_cchan.o \ 13 | pvr_osi.o pvr_osd.o 14 | 15 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 16 | 17 | 18 | all: $(LOCAL_TARGET) 19 | 20 | %.o: %.c 21 | $(CC) $(BASE_MODCFLAGS) -c -o $@ $< 22 | 23 | $(LOCAL_TARGET) : $(OBJS) 24 | $(LD) -m elf32ppclinux -r -o $@ $(OBJS) 25 | # $(STRIP) $@ 26 | 27 | xp_osd_inf.o : xp_osd_inf.c \ 28 | $(COMMONHEADERS) \ 29 | 30 | xp_osd_drv.o : xp_osd_drv.c \ 31 | $(COMMONHEADERS) \ 32 | 33 | xp_osi.o : xp_osi.c \ 34 | $(COMMONHEADERS) \ 35 | 36 | xp_osi_chann.o : xp_osi_chann.c \ 37 | $(COMMONHEADERS) \ 38 | 39 | xp_osi_clk.o : xp_osi_clk.c \ 40 | $(COMMONHEADERS) \ 41 | 42 | xp_atom_dcr.o : xp_atom_dcr.c \ 43 | $(COMMONHEADERS) \ 44 | 45 | xp_osi_filte.o : xp_osi_filte.c \ 46 | $(COMMONHEADERS) \ 47 | 48 | xp_osi_inter.o : xp_osi_inter.c \ 49 | $(COMMONHEADERS) \ 50 | 51 | xp_osi_key.o : xp_osi_key.c \ 52 | $(COMMONHEADERS) \ 53 | 54 | xp_osi_queue.o : xp_osi_queue.c \ 55 | $(COMMONHEADERS) \ 56 | 57 | xp_osi_pcr.o : xp_osi_pcr.c \ 58 | $(COMMONHEADERS) \ 59 | 60 | pvr_osi.o : pvr_osi.c \ 61 | $(COMMONHEADERS) \ 62 | 63 | pvr_osd.o : pvr_osd.c \ 64 | $(COMMONHEADERS) \ 65 | 66 | pvrtester: 67 | make -C pvrtest 68 | 69 | test_apps : $(LOCAL_TEST) pvrtester 70 | 71 | test_av : test_av.c tv_function.c 72 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -o $@ $^ 73 | 74 | test_rec_ts : test_rec_ts.c 75 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -o $@ $< 76 | 77 | test_pvr : test_pvr.c 78 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -o $@ $< 79 | 80 | test_rec_pes : test_rec_pes.c tv_function.c 81 | $(CC) -I$(LSP_INCLUDE_DIR) -I$(TOP_DIR)/include -o $@ $^ 82 | 83 | .PHONY : clean 84 | 85 | clean : 86 | rm -f $(OBJS) $(LOCAL_TARGET) $(LOCAL_TEST) 87 | make -C pvrtest clean 88 | 89 | 90 | install : test_apps 91 | @if [ ! -d $(LOCALBIN_DIR) ] ; then \ 92 | echo "Creating target directory : " $(LOCALBIN_DIR) ; \ 93 | mkdir -p $(LOCALBIN_DIR) ; \ 94 | fi 95 | install $(LOCAL_TEST) $(LOCALBIN_DIR) 96 | make -C pvrtest install 97 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/ttx/ttx.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | IBM CONFIDENTIAL 18 | | STB025XX VXWORKS EVALUATION KIT SOFTWARE 19 | | (C) COPYRIGHT IBM CORPORATION 2003 20 | +----------------------------------------------------------------------------*/ 21 | /*----------------------------------------------------------------------------+ 22 | | Author : Katsuyuki Sugita 23 | | Component : ttx 24 | | File : ttx.h 25 | | Purpose : Teletext Driver include file 26 | | Changes : 27 | | 28 | | Date: By Comment: 29 | | --------- --- -------- 30 | | 22-Sep-03 TJC Modified 31 | +----------------------------------------------------------------------------*/ 32 | #ifndef _TTX_H_ 33 | #define _TTX_H_ 34 | 35 | /*----------------------------------------------------------------------------+ 36 | | Defines 37 | +----------------------------------------------------------------------------*/ 38 | #define SUCCESS 0 39 | #define E_TTX_NOT_INITIALIZED -1 40 | #define E_TTX_NOMEM -2 41 | #define E_TTX_BAD_LENGTH -3 42 | #define E_TTX_BAD_DISP_MODE -4 43 | #define E_TTX_LESS_VBI_COUNT -5 44 | #define E_TTX_VDC_INT_NOTIFY -6 45 | #define E_TTX_BAD_VBI_ADDR -7 46 | 47 | /*----------------------------------------------------------------------------+ 48 | | Function Prototypes 49 | +----------------------------------------------------------------------------*/ 50 | int ttx_initialize(); 51 | int ttx_terminate(); 52 | int ttx_write(void *buffer, size_t length); 53 | int ttx_insert_pid(unsigned short pid); 54 | int ttx_delete_pid(void); 55 | void ttx_stats_get(unsigned long); 56 | void ttx_stats_clear(void); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/aud/drv.make: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # audio makefile 3 | # --------------------------------------------------------------------------------- 4 | # Changelog: 5 | # 6 | # 24Jun03 JFD Added targets to make restricted microcode (AC3 decode, DTS/LPCM) 7 | # 22Jul03 JFD Updated coreload names to latest release level 8 | # 9 | #################################################################################### 10 | 11 | #################################################################################### 12 | # Make sure you are using the correct micro code 13 | #################################################################################### 14 | AUDIO_MICRO_BIN = s5amp318.bin 15 | AUDIO_MICRO_DAT = s5amp318.dat 16 | #AUDIO_AC3_BIN = s5advdr15.bin 17 | #AUDIO_AC3_DAT = s5advdr15.dat 18 | #AUDIO_DTS_BIN = s5adts17.bin 19 | #AUDIO_DTS_DAT = s5adts17.dat 20 | 21 | AUDIO_MICROCODE := aud_uc.h astb_d.h 22 | ifdef AUDIO_AC3_BIN 23 | AUDIO_MICROCODE += aud_dvd.h advd_d.h 24 | AUD_MODCFLAGS += -DAC3_ENABLE 25 | endif 26 | ifdef AUDIO_DTS_BIN 27 | AUDIO_MICROCODE += aud_dts.h adts_d.h 28 | AUD_MODCFLAGS += -DDTS_ENABLE 29 | endif 30 | 31 | LOCAL_TARGET := aud.o 32 | 33 | LOCAL_DEF := 34 | 35 | include ../config.local 36 | 37 | 38 | OBJS := aud_atom.o aud_atom_sync.o aud_osi.o aud_osd.o aud_inf.o aud_atom_mixer.o aud_osi_clip.o \ 39 | aud_osi_mixer.o ../clip/clip.o 40 | 41 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/hw/gpt_ports.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 42 | 43 | 44 | 45 | all: $(LOCAL_TARGET) 46 | 47 | aud_atom.o: aud_atom.c $(AUDIO_MICROCODE) 48 | $(CC) $(LOCAL_DEF) $(AUD_MODCFLAGS) $(BASE_MODCFLAGS) -c -o $@ $< 49 | 50 | aud_uc.h: $(AUDIO_MICRO_BIN) 51 | ../tools/img2header $< $@ -x -d aud_ucode_stb -n aud_ucode_stb_len -s 52 | 53 | astb_d.h: $(AUDIO_MICRO_DAT) 54 | ../tools/img2header $< $@ -x -d astb_d -n astb_d_len -s 55 | 56 | aud_dvd.h: $(AUDIO_AC3_BIN) 57 | ../tools/img2header $< $@ -x -d aud_ucode_dvd -n aud_ucode_dvd_len -s 58 | 59 | advd_d.h: $(AUDIO_AC3_DAT) 60 | ../tools/img2header $< $@ -x -d advd_d -n advd_d_len -s 61 | 62 | aud_dts.h: $(AUDIO_DTS_BIN) 63 | ../tools/img2header $< $@ -x -d aud_ucode_dts -n aud_ucode_dts_len -s 64 | 65 | adts_d.h: $(AUDIO_DTS_DAT) 66 | ../tools/img2header $< $@ -x -d adts_d -n adts_d_len -s 67 | 68 | %.o: %.c 69 | $(CC) $(LOCAL_DEF) $(BASE_MODCFLAGS) -c -o $@ $< 70 | 71 | $(LOCAL_TARGET) : $(OBJS) 72 | $(LD) -m elf32ppclinux -r -o $@ $(OBJS) 73 | # $(STRIP) $@ 74 | 75 | .PHONY : clean 76 | 77 | test_apps: 78 | 79 | clean : 80 | rm -f $(OBJS) $(LOCAL_TARGET) $(AUDIO_MICROCODE) 81 | 82 | install : $(LOCAL_TARGET) 83 | 84 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/ttx/test_ttx.readme: -------------------------------------------------------------------------------- 1 | TEST_TTX Teletext Application README File 2 | ----------------------------------------- 3 | 4 | Purpose: The purpose of this readme is to describe how to use the 5 | "test_ttx" application. 6 | 7 | Preliminary: Before using the "test_ttx" application, ensure that the 8 | Teletext node has been created and the module has been 9 | installed. Refer to the readme file in the "STB04xxx" 10 | directory for details. 11 | 12 | Invokation: Type "test_ttx" and then enter on the Linux command line to 13 | display the Teletext command prompt. 14 | 15 | Menu 16 | Options: Below is a description of the menu commands supported: 17 | 1. t h[elp] - Displays the command menu. 18 | 2. t init - Initializes the Teletext Driver. Open 19 | required drivers and allocate resources. 20 | This step is required before the 21 | teletext display can be started. 22 | 3. t term - Terminate the Teletext Driver. Close 23 | all drivers and release all resources. 24 | 4. t start - Start teletext display where: 25 | ppid = the PCR PID 26 | tpid = Teletext PID 27 | Teletext driver must be initialized. 28 | 5. t stop - Stop teletext processing 29 | 6. t stat - Get: Get Teletext processing stats. 30 | Clear: Clear Teletext processing stats. 31 | 7. t q[quit] - Close the Teletext Driver (ie. "t term" 32 | is implicitly performed) and return to 33 | the Linux command prompt. 34 | 35 | Application 36 | Notes: 1. Teletext is supported in PAL mode only. 37 | 2. During initialization of the Teletext driver, an attempt 38 | will be made to open the Video Driver to change the video 39 | format to PAL mode. In the event that the video driver is 40 | already opened (ie. by the "test_av" application), the open 41 | will fail since the video driver can only be opened by one 42 | application. In this case, "test_ttx" assumes that the 43 | display format has already been set to the PAL format. If 44 | it has not, the Teletext driver initialization step will fail. 45 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/xp/pvr_osd.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1998 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author : Ian Govett 22 | | Component : xp 23 | | File : pvr_osd.h 24 | | Purpose : header file for PVR API 25 | | Changes : 26 | | 27 | | Date By Comments 28 | | --------- --- -------------------------------------------------------- 29 | | 10-OCt-01 LGH Created 30 | +----------------------------------------------------------------------------*/ 31 | //#include 32 | 33 | #define PVR_IOC_MAGIC 'y' 34 | #define PVR_SET_MODE _IO(PVR_IOC_MAGIC,1) 35 | #define PVR_STOP _IO(PVR_IOC_MAGIC,2) 36 | #define PVR_GET_STATUS _IO(PVR_IOC_MAGIC,3) 37 | #define PVR_BUFF_FLUSH _IO(PVR_IOC_MAGIC,4) 38 | #define PVR_SET_VID_PID _IO(PVR_IOC_MAGIC,5) 39 | #define PVR_ALLOCATE_BUFFER _IO(PVR_IOC_MAGIC,6) 40 | #define PVR_FREE_BUFFER _IO(PVR_IOC_MAGIC,7) 41 | #define PVR_WRITE_BUFFER _IO(PVR_IOC_MAGIC,8) 42 | 43 | typedef enum pvr_usr_playback_mode_t 44 | { 45 | PLAY_WORD = 0, 46 | PLAY_LINE 47 | } PVR_USR_PLAYBACK_MODE; 48 | 49 | typedef struct pvr_usr_status_t 50 | { 51 | int Empty; 52 | int Full; 53 | } PVR_USR_STATUS; 54 | 55 | struct pvr_write_buffer_t 56 | { 57 | void *vaddr; 58 | unsigned long len; 59 | }; 60 | 61 | typedef struct pvr_write_buffer_t PVR_WRITE_BUFFER_PARAM; 62 | 63 | struct pvr_allocate_buffer_t 64 | { 65 | void *vaddr; 66 | unsigned long len; 67 | }; 68 | 69 | typedef struct pvr_allocate_buffer_t PVR_ALLOCATE_BUFFER_PARAM; 70 | 71 | 72 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/os/drv_debug.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/include/os/drv_debug.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // Common debug print routines for Linux 25 | //Revision Log: 26 | // Sept/10/2001 Created by YYD 27 | 28 | #ifndef _DRV_INCLUDE_OS_DRV_DEBUG_H_INC_ 29 | #define _DRV_INCLUDE_OS_DRV_DEBUG_H_INC_ 30 | 31 | #include 32 | 33 | // due to the limitation of gcc 2.95.3, we could not add __LINE__ 34 | 35 | #ifdef __DRV_DEBUG 36 | #if ( __GNUC__ > 2) 37 | #define PDEBUG(fmt, args...) printk(KERN_NOTICE "%s:%s: " fmt,__FILE__, __FUNCTION__, ##args) 38 | #else 39 | #define PDEBUG(fmt, args...) printk(KERN_NOTICE __FILE__ ":" __FUNCTION__ ": " fmt, ##args) 40 | #endif 41 | #define PDEBUGE(fmt, args...) printk(fmt, ##args) 42 | 43 | #else 44 | #define PDEBUG(fmt, args...) 45 | #define PDEBUGE(fmt, args...) 46 | #endif 47 | 48 | #if ( __GNUC__ > 2) 49 | #define PFATAL(fmt, args...) printk(KERN_CRIT "*** %s:%s: " fmt, __FILE__, __FUNCTION__, ##args) 50 | #else 51 | #define PFATAL(fmt, args...) printk(KERN_CRIT "*** " __FILE__ ":" __FUNCTION__ ": " fmt, ##args) 52 | #endif 53 | #define PFATALE(fmt, args...) printk(KERN_CRIT fmt, ##args) 54 | 55 | #if ( __GNUC__ > 2) 56 | #define PINFO(fmt, args...) printk(KERN_NOTICE "*** %s:%s: " fmt, __FILE__, __FUNCTION__,##args) 57 | #else 58 | #define PINFO(fmt, args...) printk(KERN_NOTICE "*** " __FILE__ ":" __FUNCTION__ ": " fmt, ##args) 59 | #endif 60 | #define PINFOE(fmt, args...) printk(KERN_NOTICE fmt, ##args) 61 | 62 | #endif //_DRV_INCLUDE_OS_DRV_DEBUG_H_INC_ 63 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/xp_osi_cchan.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1998 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author : Tony Cerreto 22 | | Component : xp 23 | | File : xp_cchan.h 24 | | Purpose : XP Change Channel declarations and prototypes 25 | | Changes : 26 | | 27 | | Date: By Comment: 28 | | --------- --- -------- 29 | | 04-Jun-01 TJC Created 30 | | 30-Sep-01 LGH ported to Linux 31 | +----------------------------------------------------------------------------*/ 32 | #ifndef XP_CCHAN_H 33 | #define XP_CCHAN_H 34 | 35 | /*----------------------------------------------------------------------------+ 36 | | Local Prototype Definitions 37 | +----------------------------------------------------------------------------*/ 38 | void xp_osi_cchan_auto ( 39 | GLOBAL_RESOURCES *pGlobal, 40 | USHORT uwApid, 41 | USHORT uwVpid, 42 | USHORT uwPpid); 43 | 44 | void xp_osi_video_cchan_auto ( 45 | GLOBAL_RESOURCES *pGlobal, 46 | USHORT uwVpid); 47 | 48 | void xp_osi_audio_cchan_auto ( 49 | GLOBAL_RESOURCES *pGlobal, 50 | USHORT uwApid); 51 | 52 | void xp_osi_pcr_cchan_auto ( 53 | GLOBAL_RESOURCES *pGlobal, 54 | USHORT uwPpid); 55 | 56 | SHORT xp_osi_cchan_init(GLOBAL_RESOURCES *pGlobal0); 57 | 58 | int xp_osi_cchan_start_audio(USHORT uwPid); 59 | 60 | void xp_osi_cchan_start_pcr(USHORT uwPid); 61 | 62 | int xp_osi_cchan_start_video(USHORT uwPid); 63 | 64 | int xp_osi_cchan_stop_audio(void); 65 | 66 | void xp_osi_cchan_stop_pcr(void); 67 | 68 | int xp_osi_cchan_stop_video(void); 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/vid/vid_osd.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1997, 1999, 2001 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author: Ling shao 22 | | File: vid_osd.h 23 | | Purpose: video decoder osd layer for PALLAS 24 | | Changes: 25 | | Date: Comment: 26 | | ----- -------- 27 | | 15-Oct-01 create SL 28 | +----------------------------------------------------------------------------*/ 29 | #ifndef PALLAS_VID_OSD_H 30 | #define PALLAS_VID_OSD_H 31 | 32 | #include 33 | #include 34 | #include "clip/clip.h" 35 | #include "vid_osi.h" 36 | 37 | 38 | 39 | /*divide a large data block into a group of data segments and write 40 | them to clip info queue sequentially*/ 41 | ULONG vid_osd_write(struct file *file, void *src, ULONG ulLen); 42 | INT vid_osd_get_buf_nowait(CLIPINFO *info); 43 | INT vid_osd_get_buf_wait(CLIPINFO *info); 44 | INT vid_osd_clip_write(CLIPINFO *info); 45 | INT vid_osd_cc_complete(); 46 | INT vid_osd_cc_done(); 47 | INT vid_osd_init_clip(); 48 | void vid_osd_close_clip(); 49 | UINT vid_osd_get_clip_mem_size(); 50 | INT vid_osd_init_stillp(); 51 | void vid_osd_close_stillp(); 52 | void* vid_osd_get_stillp_buf(); 53 | INT vid_osd_map_vbi_laddr(ULONG *vbi0_ula, ULONG *vbi1_ula); 54 | void vid_osd_unmap_vbi_laddr(); 55 | INT vid_osd_end_stream(); 56 | INT vid_osd_reset_frame_buffer(); 57 | INT vid_osd_init(); 58 | void vid_osd_close(); 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/ir/ir_osi_acer_kbms.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/include/osi_acer_kbms.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // OS Independent Acer ir keyboard code decoder 25 | // Acer IR keyboard Model No: WIL-14M, Revision No: 1.5 26 | //Revision Log: 27 | // Sept/10/2001 Created by YYD 28 | 29 | #ifndef _DRV_INCLUDE_OSI_ACER_KBMS_H_INC_ 30 | #define _DRV_INCLUDE_OSI_ACER_KBMS_H_INC_ 31 | 32 | #include "os/os-types.h" 33 | 34 | 35 | // for the mouse event handler of ir_osi_process_acer_keycode 36 | #define __IR_MOUSE_LBUTTON_DOWN (0x0001) 37 | #define __IR_MOUSE_LBUTTON_UP (0x0100) 38 | #define __IR_MOUSE_MBUTTON_DOWN (0x0002) 39 | #define __IR_MOUSE_MBUTTON_up (0x0200) 40 | #define __IR_MOUSE_RBUTTON_DOWN (0x0004) 41 | #define __IR_MOUSE_RBUTTON_UP (0x0400) 42 | 43 | 44 | // detect and return hitachi TV/VCR ir rc code 45 | // input the GPTC timediff and pCode 46 | int ir_osi_detect_acer_keycode(UINT32 timediff, UINT32 *pCode); 47 | // return 1, keyboard code detected and returned by *pCode 48 | // return 0, timing code get correctly 49 | // return -1, timimg code error, detector resetted 50 | 51 | void ir_osi_reset_acer_detector(void); 52 | // reset the detector plus stat 53 | 54 | void ir_osi_get_acer_detector_stat(UINT *pKey, UINT *pMouse, UINT*pError); 55 | // get machine statistics 56 | 57 | 58 | int ir_osi_process_acer_keycode(UINT32 uCode, void (*keycode_handler)(USHORT wCode, USHORT wDown), void (*mouse_handler)(INT nHorizontal, INT nVertical, USHORT uButtonEvent)); 59 | 60 | 61 | #endif // _DRV_INCLUDE_OSI_ACER_KBMS_H_INC_ 62 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/rtc_fpc/rtc_fpc.h: -------------------------------------------------------------------------------- 1 | //vulcan/drv/include/rtc_fpc/rtc_fpc.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | 23 | #ifndef RTC_FPC_H 24 | #define RTC_FPC_H 25 | 26 | 27 | //Declare the driver related entities. 28 | typedef struct _STB_RTC_TIME { 29 | unsigned char secs; 30 | unsigned char mins; 31 | unsigned char hours; 32 | unsigned char am_pm; 33 | unsigned char days; 34 | } STB_RTC_TIME, *PSTB_RTC_TIME; 35 | 36 | 37 | #define RTC_FPC_DEV_MAJOR 0xf0 38 | 39 | #define RTC_FPC_DEV_NAME "stbrtc" 40 | 41 | #define RTC_FPC_DEV_MAGIC 0xf0 42 | 43 | #define IOC_RTC_FPC_GET_TIME _IOR(RTC_FPC_DEV_MAGIC, 1, STB_RTC_TIME *) 44 | #define IOC_RTC_FPC_SET_TIME _IOW(RTC_FPC_DEV_MAGIC, 2, STB_RTC_TIME *) 45 | 46 | #define IOC_RTC_FPC_GET_ALRM_TIME _IOR(RTC_FPC_DEV_MAGIC, 3, STB_RTC_TIME *) 47 | #define IOC_RTC_FPC_SET_ALRM_TIME _IOW(RTC_FPC_DEV_MAGIC, 4, STB_RTC_TIME *) 48 | 49 | #define IOC_RTC_FPC_SET_FP_DATA _IOW(RTC_FPC_DEV_MAGIC, 5, unsigned char *) 50 | 51 | #define IOC_RTC_FPC_ENA_ALMINT _IO(RTC_FPC_DEV_MAGIC, 6) 52 | #define IOC_RTC_FPC_DIS_ALMINT _IO(RTC_FPC_DEV_MAGIC, 7) 53 | 54 | #define IOC_RTC_FPC_ENA_UPEINT _IO(RTC_FPC_DEV_MAGIC, 8) 55 | #define IOC_RTC_FPC_DIS_UPEINT _IO(RTC_FPC_DEV_MAGIC, 9) 56 | 57 | #define IOC_RTC_FPC_ENA_DISPDAT _IO(RTC_FPC_DEV_MAGIC, 10) 58 | #define IOC_RTC_FPC_ENA_DISPRTC _IO(RTC_FPC_DEV_MAGIC, 11) 59 | 60 | #define IOC_RTC_FPC_SET_24TOFM _IO(RTC_FPC_DEV_MAGIC, 12) 61 | #define IOC_RTC_FPC_SET_12TOFM _IO(RTC_FPC_DEV_MAGIC, 13) 62 | 63 | #define IOC_RTC_FPC_WAIT_FOR_ALRM _IO(RTC_FPC_DEV_MAGIC, 14) 64 | 65 | #endif 66 | 67 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/fe_sonysat/tuner.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | 3 | | This source code has been made available to you by IBM on an AS-IS 4 | | basis. Anyone receiving this source is licensed under IBM 5 | | copyrights to use it in any way he or she deems fit, including 6 | | copying it, modifying it, compiling it, and redistributing it either 7 | | with or without modifications. No license under IBM patents or 8 | | patent applications is to be implied by the copyright license. 9 | | 10 | | Any user of this software should understand that IBM cannot provide 11 | | technical support for this software and will not be responsible for 12 | | any consequences resulting from the use of this software. 13 | | 14 | | Any person who transfers this source code or any derivative work 15 | | must include the IBM copyright notice, this paragraph, and the 16 | | preceding two paragraphs in the transferred software. 17 | | 18 | | COPYRIGHT I B M CORPORATION 2003 19 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 20 | +----------------------------------------------------------------------------*/ 21 | 22 | #ifndef TUNER_H 23 | #define TUNER_H 24 | 25 | #define TUNER_DEV_MAJOR 250 26 | #define TUNER_DEV_NAME "fe_sonysat" 27 | #define TUNER_DEV_MAGIC 250 28 | 29 | #define SONY_TUNER_ADDR (0x10>>1) 30 | 31 | /*** Tuner IOCTL parameters ***/ 32 | 33 | typedef struct { 34 | unsigned char lnb_power; 35 | unsigned char disecq_ctrl; 36 | unsigned long symbolrate; 37 | long symbolrateband; 38 | unsigned long symbolrateparm; 39 | unsigned long freq; 40 | unsigned char rf_val[4]; 41 | } IOCTL_TUNE_PARAMETER; 42 | 43 | typedef struct { 44 | unsigned char lnb_power; 45 | unsigned char disecq_ctrl; 46 | unsigned long symbolrate; 47 | unsigned long freq; 48 | unsigned char tslock; 49 | unsigned char code_rate_n; // code rate = num/div 50 | unsigned char code_rate_d; 51 | } IOCTL_STATUS_PARAMETER; 52 | 53 | /*** Tuner IOCTL interface ***/ 54 | 55 | #define TUNER_IOCTL_TUNE _IOW(TUNER_DEV_MAGIC, 1, ULONG) 56 | #define TUNER_IOCTL_STATUS _IOW(TUNER_DEV_MAGIC, 2, ULONG) 57 | 58 | /*** LNB control ***/ 59 | 60 | #define FE_LNB_NO_POWER 0 61 | #define FE_LNB_POWER_VERTICAL 1 62 | #define FE_LNB_POWER_HORIZONTAL 2 63 | 64 | /*** Disecq control ***/ 65 | 66 | #define FE_DISECQ_22K_OFF 0 67 | #define FE_DISECQ_22K_ON 1 68 | 69 | 70 | 71 | #endif 72 | 73 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/rtc_fpc/rtc_t.c: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1997, 1999, 2001 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | +----------------------------------------------------------------------------*/ 22 | #include 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | 30 | #include "rtc_fpc/rtc_fpc.h" 31 | 32 | 33 | int main(int argc, char **argv) 34 | { 35 | int fd; 36 | STB_RTC_TIME st_app_time; 37 | unsigned char uc_disp[5]; 38 | 39 | printf("open the STBRTC device\n"); 40 | if((fd = open("/dev/stbrtc",O_RDWR)) < 0 ) { 41 | printf("Open stbrtc fail\n"); 42 | return 0; 43 | } 44 | 45 | ioctl(fd, IOC_RTC_FPC_GET_TIME, &st_app_time); 46 | 47 | printf("The Real Time Values are :\n"); 48 | 49 | printf("Days : %d\n", st_app_time.days); 50 | printf("Hours : %d\n", st_app_time.hours); 51 | printf("Minutes : %d\n", st_app_time.mins); 52 | printf("Seconds : %d\n", st_app_time.secs); 53 | 54 | printf("Setting the Alarm 5 Secs higher than the time Read\n"); 55 | 56 | st_app_time.secs += 5; 57 | if(st_app_time.secs > 59){ 58 | st_app_time.secs -= 59; 59 | } 60 | 61 | ioctl(fd, IOC_RTC_FPC_SET_ALRM_TIME, &st_app_time); 62 | ioctl(fd, IOC_RTC_FPC_ENA_ALMINT, 0); 63 | 64 | ioctl(fd, IOC_RTC_FPC_GET_ALRM_TIME, &st_app_time); 65 | 66 | printf("Read Alarm Time Values are :\n"); 67 | 68 | printf("Days : %d\n", st_app_time.days); 69 | printf("Hours : %d\n", st_app_time.hours); 70 | printf("Minutes : %d\n", st_app_time.mins); 71 | printf("Seconds : %d\n", st_app_time.secs); 72 | 73 | close(fd); 74 | 75 | return (0); 76 | } 77 | 78 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/aud/aud_osd.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1997, 1999, 2001 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author: Ling shao 22 | | File: aud_osd.h 23 | | Purpose: audio driver osd layer PALLAS 24 | | Changes: 25 | | Date: Comment: 26 | | ----- -------- 27 | | 15-Oct-01 create SL 28 | +----------------------------------------------------------------------------*/ 29 | #ifndef PALLAS_AUD_OSD_H 30 | #define PALLAS_AUD_OSD_H 31 | 32 | #include 33 | #include 34 | #include "clip/clip.h" 35 | 36 | typedef struct tagAudWriteStruct 37 | { 38 | ULONG ulBufPhyStart; 39 | ULONG ulBufSize; 40 | CLIPDEV_T clipdev; 41 | int (*aud_osi_clip_init)(ULONG, ULONG); 42 | void (*aud_osi_clip_close)(); 43 | CLIPDEV_T (*aud_osi_get_dev)(); 44 | ULONG ulBufLogAdr; 45 | UINT uEndOfStream; 46 | UINT uMapped; 47 | }AUD_WRITE_STRU; 48 | 49 | 50 | /*divide a large data block into a group of data segments and write 51 | them to clip info queue sequentially*/ 52 | ULONG aud_osd_write(AUD_WRITE_STRU *pDev, struct file *file, void *src, ULONG ulLen); 53 | INT aud_osd_get_buf_nowait(AUD_WRITE_STRU *pDev, CLIPINFO *info); 54 | INT aud_osd_get_buf_wait(AUD_WRITE_STRU *pDev, CLIPINFO *info); 55 | INT aud_osd_clip_write(AUD_WRITE_STRU *pDev, CLIPINFO *info); 56 | INT aud_osd_init_clip(AUD_WRITE_STRU *pDev); 57 | void aud_osd_close_clip(AUD_WRITE_STRU *pDev); 58 | INT aud_osd_end_stream(AUD_WRITE_STRU *pDev); 59 | INT aud_osd_mmap(AUD_WRITE_STRU *pDev, struct vm_area_struct *vma); 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/os/helper-queue.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/include/os/helper-queue.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // Common Queue helper routines 25 | //Revision Log: 26 | // Sept/03/2001 Created by YYD 27 | // Sept/21/2001 Added multiple element I/O by YYD 28 | 29 | #ifndef _DRV_INCLUDE_OS_HELPER_QUEUE_H_INC_ 30 | #define _DRV_INCLUDE_OS_HELPER_QUEUE_H_INC_ 31 | 32 | #include "os-types.h" 33 | 34 | struct __QUEUE_T_STRUCT 35 | { 36 | void *pQueue; 37 | UINT uQueueSize; 38 | UINT uElementSize; 39 | UINT uReadHead; 40 | UINT uWriteHead; 41 | UINT uAttr; // internel attribute 42 | }; 43 | 44 | typedef struct __QUEUE_T_STRUCT QUEUE_T; 45 | 46 | INT os_create_queue (QUEUE_T *pQueue, void *pBuffer, UINT uElements, UINT uElementSize); 47 | 48 | INT os_delete_queue (QUEUE_T *pQueue); 49 | 50 | INT os_enqueue (QUEUE_T *pQueue, void *pBuffer); 51 | 52 | INT os_dequeue (QUEUE_T *pQueue, void *pBuffer); 53 | 54 | void *os_enqueue_fast_start (QUEUE_T *pQueue); 55 | 56 | INT os_enqueue_fast_finish (QUEUE_T *pQueue); 57 | 58 | void *os_dequeue_fast_start (QUEUE_T *pQueue); 59 | 60 | INT os_dequeue_fast_finish (QUEUE_T *pQueue); 61 | 62 | INT os_flush_queue (QUEUE_T *pQueue); 63 | 64 | INT os_get_queue_status (QUEUE_T *pQueue); 65 | 66 | // added 67 | void *os_enqueue_multiple_start (QUEUE_T *pQueue, UINT uWhichElement); 68 | 69 | INT os_enqueue_multiple_finish (QUEUE_T *pQueue, UINT uWhichElement); 70 | 71 | void *os_dequeue_multiple_start (QUEUE_T *pQueue, UINT uWhichElement); 72 | 73 | INT os_dequeue_multiple_finish (QUEUE_T *pQueue, UINT uWhichElement); 74 | 75 | #endif // _DRV_INCLUDE_OS_HELPER_QUEUE_H_INC_ 76 | 77 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/eeprom/ee_t.c: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1997 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------- 21 | | Test file for eeprom xicor X24165 22 | | 4-Jun-01 Create by shaol 23 | | 24 | +-----------------------------------------------------------------------------*/ 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #include "eeprom.h" 32 | 33 | #define MAX_NUM 0x30 34 | unsigned char buf[MAX_NUM]; 35 | 36 | unsigned char r_buf[MAX_NUM]; 37 | 38 | int main() 39 | { 40 | int fd, i; 41 | int ret, err = 0; 42 | 43 | if ((fd = open(EEPROM_I2C_BUS, O_RDWR)) < 0) 44 | { 45 | printf("open dev file '%s' error\n", EEPROM_I2C_BUS); 46 | return 0; 47 | } 48 | 49 | for (i = 0; i < MAX_NUM; i++) 50 | { 51 | buf[i] = i + 1; 52 | } 53 | 54 | if (eeprom_write_begin(fd) < 0) 55 | { 56 | printf("write begin error\n"); 57 | goto EE_END; 58 | } 59 | 60 | /* ret = eeprom_read(fd, 0x7ff, r_buf, 1); printf("pro reg = %x\n", r_buf[0]); */ 61 | 62 | ret = eeprom_write(fd, 0x1023, buf, MAX_NUM - 1); 63 | 64 | printf("%x number of bytes written\n", ret); 65 | 66 | usleep(10); 67 | 68 | ret = eeprom_read(fd, 0x1023 , r_buf, MAX_NUM - 1); 69 | 70 | printf("%x number of bytes read\n", ret); 71 | 72 | for (i = 0; i < MAX_NUM - 1; i++) 73 | { 74 | if (buf[i] != r_buf[i]) 75 | { 76 | printf(" [%d] = %d, %d\n", i, buf[i], r_buf[i]); 77 | err++; 78 | } 79 | } 80 | 81 | printf("error number = %d\n", err); 82 | 83 | EE_END: 84 | close(fd); 85 | return 0; 86 | } 87 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/scp/test/sem.c: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1997, 1999, 2001, 2003 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | #include 21 | 22 | 23 | int CreateSemaphore(int ); 24 | int SemPost( int); 25 | int SemWait( int); 26 | void DeleteSemaphore( int ); 27 | 28 | int CreateSemaphore(int count ) 29 | { 30 | int semid; 31 | 32 | #if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) 33 | union semun parm /* union is defined by including */ 34 | #else 35 | /* according to X/OPEN we have to define it ourselves */ 36 | union semun { 37 | int val; /* value for SETVAL */ 38 | struct semid_ds *buf; /* buffer for IPC_STAT, IPC_SET */ 39 | unsigned short *array; /* array for GETALL, SETALL */ 40 | /* Linux specific part: */ 41 | struct seminfo *__buf; /* buffer for IPC_INFO */ 42 | } parm; 43 | #endif 44 | 45 | semid = semget( IPC_PRIVATE, 1, 0664 | IPC_CREAT | IPC_EXCL ); 46 | if( semid < 0 ) 47 | return(-1); 48 | parm.val = count; 49 | if( semctl( semid, 0, SETVAL, parm) < 0) 50 | { 51 | DeleteSemaphore( semid ); 52 | return(-1); 53 | } 54 | return(semid); 55 | } 56 | 57 | void DeleteSemaphore( int semid ) 58 | { 59 | semctl( semid, IPC_RMID, 0 ); 60 | return; 61 | } 62 | 63 | int SemPost( int semid ) 64 | { 65 | struct sembuf sem; 66 | 67 | sem.sem_num = 0; 68 | sem.sem_op = 1; 69 | sem.sem_flg = 0; 70 | 71 | if(semop( semid, &sem, 1 ) == -1 ) 72 | return(-1); 73 | else 74 | return(0); 75 | } 76 | 77 | int SemWait( int semid ) 78 | { 79 | struct sembuf sem; 80 | 81 | sem.sem_num = 0; 82 | sem.sem_op = -1; 83 | sem.sem_flg = 0; 84 | 85 | if( semop( semid, &sem, 1 ) == -1 ) 86 | return(-1); 87 | else 88 | return(0); 89 | } 90 | 91 | 92 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/scp/scp_osd.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1997, 1999, 2001, 2003 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author: Mark Detrick 22 | | Component: scp 23 | | File: scp_osd.h 24 | | Purpose: OS dependant functions for serial control port 25 | | Changes: 26 | | 27 | | Date: Author Comment: 28 | | ---------- ---------------- ----------------------------------------------- 29 | | 09/19/2003 MSD Created. 30 | +----------------------------------------------------------------------------*/ 31 | 32 | #ifndef _scp_osd_h_ 33 | #define _scp_osd_h_ 34 | 35 | #include "os/os-sync.h" 36 | 37 | /*----------------------------------------------------------------------- 38 | ** SCP/SPI Register id's 39 | **----------------------------------------------------------------------*/ 40 | #define SCP_SPMODE 0 41 | #define SCP_RXDATA 1 42 | #define SCP_TXDATA 2 43 | #define SCP_SPCOM 3 44 | #define SCP_STATUS 4 45 | #define SCP_CDM 6 46 | 47 | 48 | typedef struct 49 | { 50 | char *write_ptr; 51 | char *read_ptr; 52 | int count; 53 | SEMAPHORE_T done_sem; 54 | int device; 55 | } scp_struct; 56 | 57 | int scp_osd_init(); 58 | int scp_osd_uninit(); 59 | int scp_osi_display_regs(); 60 | int scp_osi_get_cmd(unsigned long *p_value); 61 | int scp_osi_set_cmd(unsigned long value); 62 | int scp_osi_get_reverse_data(unsigned long *p_value); 63 | int scp_osi_set_reverse_data(unsigned long value); 64 | int scp_osi_get_clock_invert(unsigned long *p_value); 65 | int scp_osi_set_clock_invert(unsigned long value); 66 | int scp_osi_get_loopback(unsigned long *p_value); 67 | int scp_osi_set_loopback(unsigned long value); 68 | int scp_osd_rw(char *pInput, char *pOutput, int dwCount, int dwDev); 69 | 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/ttx/ttx_dbg.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | IBM CONFIDENTIAL 18 | | STB025XX VXWORKS EVALUATION KIT SOFTWARE 19 | | (C) COPYRIGHT IBM CORPORATION 2003 20 | +----------------------------------------------------------------------------*/ 21 | /*----------------------------------------------------------------------------+ 22 | | Author: David Judkovics 23 | | Component: teletext 24 | | File: ttx_dbg.h 25 | | Purpose: 26 | | Changes: 27 | | Date: Comment: 28 | | ----- -------- 29 | | 25-Apr-01 Created 30 | ---------------------------------------------------------------------------*/ 31 | #ifndef _TTX_DBG_H 32 | #define _TTX_DBG_H 33 | 34 | /*----------------------------------------------------------------------------+ 35 | | Data Declarations 36 | +----------------------------------------------------------------------------*/ 37 | typedef struct dbg_stat { 38 | unsigned char *base, 39 | *ptr; 40 | unsigned int size, 41 | wrap; 42 | } dbg_stat, *Dbg_stat; 43 | 44 | /*----------------------------------------------------------------------------+ 45 | | Prototype Definitions 46 | +----------------------------------------------------------------------------*/ 47 | int ttx_debug_init(unsigned int size, Dbg_stat *dbg_ptr); 48 | void ttx_debug_data(Dbg_stat debug_stat, char *sptr, unsigned int data); 49 | void ttx_debug_2data(Dbg_stat debug_stat, char *sptr, unsigned int a, unsigned int b); 50 | void ttx_debug_3data(Dbg_stat debug_stat, char *sptr, 51 | unsigned int a, unsigned int b, unsigned int c); 52 | void ttx_debug_string(Dbg_stat debug_stat, unsigned char *dptr, unsigned int size); 53 | void ttx_debug_timestamp(Dbg_stat debug_stat, unsigned int x, unsigned int y); 54 | void ttx_debug_4data(Dbg_stat debug_stat, 55 | unsigned int a, unsigned int b, unsigned int c, unsigned int d); 56 | void ttx_debug_dump(Dbg_stat debug_stat, unsigned int start, int line_count); 57 | 58 | #endif /* ifndef _TTX_DBG_H */ 59 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/ir/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # ircombo makefile 3 | #################################################################################### 4 | 5 | 6 | LOCAL_TARGET := ircombo.o 7 | 8 | LOCAL_TEST := tstrawir 9 | 10 | # CONFIG_LAMAR Define this to enable support of the IR for Lamar platform 11 | # Default is for Redwood 5 platform. 12 | # _IR_MOUSE_SUPPORT Define this to enable Acer keyboard mouse pad support. 13 | # _IR_RAWMODE_ Define this to enable capturing of all remote controll 14 | # codes without filtering and translating 15 | # **** This is not compatible with old applications **** 16 | 17 | LOCAL_CFLAGS = -I$(LSP_DIR)/drivers/char -D_IR_MOUSE_SUPPORT -DCONFIG_VULCAN # -D_IR_RAWMODE_ 18 | 19 | 20 | include ../config.local 21 | 22 | 23 | OBJS := ir_inf_combo.o ir_osi_acer_kbms.o ir_osi_hitachi.o ir_osi_device.o ir_atom.o 24 | 25 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/gpt/gpt_ports.h $(DRV_INCLUDE_DIR)/os/drv_debug.h 26 | 27 | 28 | 29 | all: $(LOCAL_TARGET) 30 | 31 | %.o: %.c 32 | $(CC) $(BASE_MODCFLAGS) $(LOCAL_CFLAGS) -c -o $@ $< 33 | 34 | $(LOCAL_TARGET) : $(OBJS) 35 | $(LD) -m elf32ppclinux -r -o $@ $(OBJS) 36 | # $(STRIP) $@ 37 | 38 | ir_inf_combo.o : ir_inf_combo.c \ 39 | $(COMMONHEADERS) \ 40 | $(DRV_INCLUDE_DIR)/os/helper-queue.h \ 41 | $(DRV_INCLUDE_DIR)/os/os-sync.h \ 42 | $(DRV_INCLUDE_DIR)/os/os-generic.h \ 43 | $(DRV_INCLUDE_DIR)/ir/ir_osi_device.h \ 44 | $(DRV_INCLUDE_DIR)/ir/ir_osi_acer_kbms.h \ 45 | $(DRV_INCLUDE_DIR)/ir/ir_osi_hitachi.h 46 | 47 | 48 | ir_osi_acer_kbms.o : ir_osi_acer_kbms.c ir_osi_acer-local.h \ 49 | $(DRV_INCLUDE_DIR)/ir/ir_osi_acer_kbms.h \ 50 | $(DRV_INCLUDE_DIR)/ir/ir_osi_device.h 51 | 52 | ir_osi_hitachi.o : ir_osi_hitachi.c ir_osi_hitachi-local.h \ 53 | $(DRV_INCLUDE_DIR)/ir/ir_osi_hitachi.h \ 54 | $(DRV_INCLUDE_DIR)/ir/ir_osi_device.h 55 | 56 | ir_osi_device.o : ir_osi_device.c ir_atom.h\ 57 | $(COMMONHEADERS) \ 58 | $(DRV_INCLUDE_DIR)/ir/ir_osi_device.h 59 | 60 | ir_atom.o : ir_atom.c ir_atom.h\ 61 | $(COMMONHEADERS) 62 | 63 | 64 | .PHONY : clean 65 | 66 | test_apps: $(LOCAL_TEST) 67 | 68 | $(LOCAL_TEST) : test/tstrawir.c 69 | $(CC) -I$(LSP_INCLUDE_DIR) -o $@ $< 70 | 71 | 72 | clean : 73 | rm -f $(OBJS) $(LOCAL_TARGET) $(LOCAL_TEST) 74 | 75 | install : $(LOCAL_TARGET) $(LOCAL_TEST) 76 | @if [ ! -d $(INSTALL_ROOT)/lib/modules/$(VER)/misc ] ; then \ 77 | echo "Creating target directory : " $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 78 | mkdir -p $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 79 | fi 80 | install $(LOCAL_TARGET) $(INSTALL_ROOT)/lib/modules/$(VER)/misc 81 | @if [ ! -d $(LOCALBIN_DIR) ] ; then \ 82 | echo "Creating target directory : " $(LOCALBIN_DIR) ; \ 83 | mkdir -p $(LOCALBIN_DIR) ; \ 84 | fi 85 | install $(LOCAL_TEST) $(LOCALBIN_DIR) 86 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/ttx/ttx_osd_user.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | 3 | | This source code has been made available to you by IBM on an AS-IS 4 | | basis. Anyone receiving this source is licensed under IBM 5 | | copyrights to use it in any way he or she deems fit, including 6 | | copying it, modifying it, compiling it, and redistributing it either 7 | | with or without modifications. No license under IBM patents or 8 | | patent applications is to be implied by the copyright license. 9 | | 10 | | Any user of this software should understand that IBM cannot provide 11 | | technical support for this software and will not be responsible for 12 | | any consequences resulting from the use of this software. 13 | | 14 | | Any person who transfers this source code or any derivative work 15 | | must include the IBM copyright notice, this paragraph, and the 16 | | preceding two paragraphs in the transferred software. 17 | | 18 | | COPYRIGHT 2003 I B M CORPORATION 19 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 20 | +----------------------------------------------------------------------------*/ 21 | /*----------------------------------------------------------------------------+ 22 | | 23 | | Author : Tony J. Cerreto 24 | | File : ttx_osd_user.h 25 | | Purpose : Linux User defines 26 | | Changes : 27 | | Date Comments 28 | | ---------------------------------------------------------------------- 29 | | 25-Sep-03 Created 30 | +----------------------------------------------------------------------------*/ 31 | #ifndef TTX_OSD_USER_H 32 | #define TTX_OSD_USER_H 33 | 34 | /*----------------------------------------------------------------------------+ 35 | | Defines 36 | +----------------------------------------------------------------------------*/ 37 | #pragma pack(1) 38 | #define TTX_IOC_MAGIC 't' 39 | #define TTX_START _IO(TTX_IOC_MAGIC,1) 40 | #define TTX_STOP _IO(TTX_IOC_MAGIC,2) 41 | #define TTX_STATS_GET _IO(TTX_IOC_MAGIC,3) 42 | #define TTX_STATS_CLEAR _IO(TTX_IOC_MAGIC,4) 43 | #pragma pack() 44 | 45 | /*----------------------------------------------------------------------------+ 46 | | Type Declarations 47 | +----------------------------------------------------------------------------*/ 48 | typedef struct { 49 | unsigned int in_pkt; /* incoming packets */ 50 | unsigned int in_pusi; /* incoming PUSI */ 51 | unsigned int out_pusi; /* outgoing PUSI */ 52 | unsigned int no_pusi; /* no PUSI found in packet */ 53 | unsigned int trash_pkt; /* packet going into trash */ 54 | unsigned int inbound_pes; /* PES processed by PTS cmp */ 55 | unsigned int outbound_pes; /* PES discarded by PTS cmp */ 56 | } TTX_STATISTICS; 57 | 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/scp_inf.h: -------------------------------------------------------------------------------- 1 | //vulcan/drv/include/gfx/gfx_inf.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // Linux device driver interface of Serial Control Port (SCP) 25 | //Revision Log: 26 | 27 | #ifndef _DRV_INCLUDE_SCP_INF_H_INC_ 28 | #define _DRV_INCLUDE_SCP_INF_H_INC_ 29 | 30 | #include 31 | 32 | typedef struct 33 | { 34 | char *write_ptr; 35 | char *read_ptr; 36 | int count; 37 | } SCP_RW_STRUCT; 38 | 39 | #define SCP_SUCCESS 0 40 | #define SCP_NOT_INITIALIZED 1 41 | #define SCP_ABORT 2 42 | 43 | #define SCP_READY 0 44 | #define SCP_BUSY 1 45 | 46 | #define SCP_BUFFER_SIZE 2048 47 | 48 | #define SCP_DEV_MAJOR (0xF8) // device major 248 49 | 50 | #define SCP_DEV_NAME "/dev/scp" 51 | 52 | #define SCP_IOC_MAGIC (0xF78) // magic number to identify me 53 | 54 | #define IOCTL_SCP_DISPLAY_REGS _IO (SCP_IOC_MAGIC, 2) 55 | #define IOCTL_SCP_GET_CDM _IOR (SCP_IOC_MAGIC, 3, unsigned char) 56 | #define IOCTL_SCP_SET_CDM _IOW (SCP_IOC_MAGIC, 4, unsigned char) 57 | #define IOCTL_SCP_GET_REV_DATA _IOR (SCP_IOC_MAGIC, 5, unsigned char) 58 | #define IOCTL_SCP_SET_REV_DATA _IO (SCP_IOC_MAGIC, 6) 59 | #define IOCTL_SCP_GET_CLK_INV _IOR (SCP_IOC_MAGIC, 7, unsigned char) 60 | #define IOCTL_SCP_SET_CLK_INV _IO (SCP_IOC_MAGIC, 8) 61 | #define IOCTL_SCP_GET_LOOPBACK _IOR (SCP_IOC_MAGIC, 9, unsigned char) 62 | #define IOCTL_SCP_SET_LOOPBACK _IO (SCP_IOC_MAGIC, 10) 63 | //#define IOCTL_SFLASH_GET_STATUS _IOR (SCP_IOC_MAGIC, 11 , unsigned char) 64 | //#define IOCTL_SFLASH_TEST _IO (SCP_IOC_MAGIC, 12) 65 | #define IOCTL_SCP_RW _IOWR (SCP_IOC_MAGIC, 12, unsigned char) 66 | #define IOCTL_SFLASH_INIT _IO (SCP_IOC_MAGIC, 13) 67 | 68 | 69 | 70 | 71 | 72 | #endif // _DRV_INCLUDE_SCP_INF_H_INC_ 73 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/scp/scp_inf.h: -------------------------------------------------------------------------------- 1 | //vulcan/drv/include/gfx/gfx_inf.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // Linux device driver interface of Serial Control Port (SCP) 25 | //Revision Log: 26 | 27 | #ifndef _DRV_INCLUDE_SCP_INF_H_INC_ 28 | #define _DRV_INCLUDE_SCP_INF_H_INC_ 29 | 30 | #include 31 | 32 | typedef struct 33 | { 34 | char *write_ptr; 35 | char *read_ptr; 36 | int count; 37 | } SCP_RW_STRUCT; 38 | 39 | #define SCP_SUCCESS 0 40 | #define SCP_NOT_INITIALIZED 1 41 | #define SCP_ABORT 2 42 | 43 | #define SCP_READY 0 44 | #define SCP_BUSY 1 45 | 46 | #define SCP_BUFFER_SIZE 2048 47 | 48 | #define SCP_DEV_MAJOR (0xF8) // device major 248 49 | 50 | #define SCP_DEV_NAME "/dev/scp" 51 | 52 | #define SCP_IOC_MAGIC (0xF78) // magic number to identify me 53 | 54 | #define IOCTL_SCP_DISPLAY_REGS _IO (SCP_IOC_MAGIC, 2) 55 | #define IOCTL_SCP_GET_CDM _IOR (SCP_IOC_MAGIC, 3, unsigned char) 56 | #define IOCTL_SCP_SET_CDM _IOW (SCP_IOC_MAGIC, 4, unsigned char) 57 | #define IOCTL_SCP_GET_REV_DATA _IOR (SCP_IOC_MAGIC, 5, unsigned char) 58 | #define IOCTL_SCP_SET_REV_DATA _IO (SCP_IOC_MAGIC, 6) 59 | #define IOCTL_SCP_GET_CLK_INV _IOR (SCP_IOC_MAGIC, 7, unsigned char) 60 | #define IOCTL_SCP_SET_CLK_INV _IO (SCP_IOC_MAGIC, 8) 61 | #define IOCTL_SCP_GET_LOOPBACK _IOR (SCP_IOC_MAGIC, 9, unsigned char) 62 | #define IOCTL_SCP_SET_LOOPBACK _IO (SCP_IOC_MAGIC, 10) 63 | //#define IOCTL_SFLASH_GET_STATUS _IOR (SCP_IOC_MAGIC, 11 , unsigned char) 64 | //#define IOCTL_SFLASH_TEST _IO (SCP_IOC_MAGIC, 12) 65 | #define IOCTL_SCP_RW _IOWR (SCP_IOC_MAGIC, 12, unsigned char) 66 | #define IOCTL_SFLASH_INIT _IO (SCP_IOC_MAGIC, 13) 67 | 68 | 69 | 70 | 71 | 72 | #endif // _DRV_INCLUDE_SCP_INF_H_INC_ 73 | -------------------------------------------------------------------------------- /BUILDING.md: -------------------------------------------------------------------------------- 1 | # Building dm500-satip 2 | 3 | **Important:** Building no longer possible with Ubuntu 16.04 due to upgrade from 4 | Make 3.82 to Make 4.1, and also Perl. I was able to build by downgrading these two 5 | things, but I strongly recommend using Ubuntu 14.04 (or similar). 6 | 7 | Start by installing the necessary tools: 8 | 9 | sudo apt-get install build-essential cramfsprogs cramfsswap file coreutils curl 10 | 11 | Then download and extract Buildroot at this repository, so that 12 | you end with a `buildroot-XXXX.XX.X` directory next to the `config_*` 13 | files. I used version 2017.05-rc3 but other versions may work as well: 14 | 15 | curl https://buildroot.org/downloads/buildroot-2017.05-rc3.tar.gz | tar xz 16 | 17 | For convenience, rename `buildroot-XXXX.XX.X` to just `buildroot`: 18 | 19 | mv buildroot-2017.05-rc3 buildroot 20 | 21 | Then supply Buildroot with one of the configuration files, depending on which version 22 | you want to build: 23 | 24 | cp config_buildroot buildroot/.config # build regular version 25 | cp config_buildroot_static buildroot/.config # build static version 26 | 27 | At this point, you can `cd buildroot` and optionally tweak the configuration 28 | by doing `make menuconfig`, `make xconfig` or whatever method you like. 29 | 30 | ## Compiling 31 | 32 | When ready for compiling, you can start building the image by doing (from 33 | inside Buildroot's directory): 34 | 35 | LANG=C LANGUAGE=C make 36 | 37 | The `LANG=C LANGUAGE=C` is not needed in theory, but we are building old code 38 | which may assume that the output of some tools is in English. 39 | 40 | And again, because we are building very old code, we will inevitably run 41 | into some build errors. The first one I found: 42 | 43 | ~~~ 44 | HOSTCC scripts/unifdef 45 | scripts/unifdef.c:209:25: error: conflicting types for ‘getline’ 46 | static Linetype getline(void); 47 | ^ 48 | In file included from scripts/unifdef.c:70:0: 49 | /usr/include/stdio.h:678:20: note: previous declaration of ‘getline’ was here 50 | extern _IO_ssize_t getline (char **__restrict __lineptr, 51 | ^ 52 | make[3]: *** [scripts/unifdef] Error 1 53 | make[2]: *** [__headers] Error 2 54 | ~~~ 55 | 56 | This is fixed by editing `output/build/linux-headers-2.6.28/scripts/unifdef.c` 57 | and replacing all three instances of `getline` with another name, say `get_line`. 58 | After that, issue the `LANG=C LANGUAGE=C make` command and the build should 59 | proceed. 60 | 61 | Another error mentions the `include/linux/socket.h` and some redefinitions 62 | of `struct iovec`. To fix it, edit 63 | `output/build/linux-headers-2.6.28/usr/include/linux/socket.h` and replace the line: 64 | 65 | ~~~ 66 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) 67 | ~~~ 68 | 69 | with just 70 | 71 | ~~~ 72 | #if defined(__KERNEL__) 73 | ~~~ 74 | 75 | Try again and the build should proceed. If you find more errors, please open 76 | an issue on this repo. 77 | 78 | When the build has finished, you should have your image at 79 | `output/images/flash.img`, ready to flash with i.e. DreamUp. 80 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/ir/ir_osi_acer-local.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/ircombo/osi_acer-local.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // Local data of OS Independent Acer ir keyboard code decoder 25 | // Acer IR keyboard Model No: WIL-14M, Revision No: 1.5 26 | //Revision Log: 27 | // Sept/11/2001 Created by YYD 28 | 29 | #ifndef _DRV_IRCOMBO_OSI_ACER_LOCAL_H_INC_ 30 | #define _DRV_IRCOMBO_OSI_ACER_LOCAL_H_INC_ 31 | 32 | #include "os/os-types.h" 33 | #include "ir/ir_osi_device.h" 34 | 35 | static USHORT acer_irkb_scan_code[128] = 36 | { 37 | 0x44, 0x57, 0x09, -1, 0x42, -1, 0x40, -1, /* 0x00-0x07 */ 38 | 0x0b, 0x58, 0x41, -1, 0x17, -1, 0x3f, -1, /* 0x08-0x0f */ 39 | 0x1b, -1, 0x1f, -1, 0x32, 0x34, 0x03, -1, /* 0x10-0x17 */ 40 | 0x27, -1, 0x11, -1, 0x21, -1, 0x04, -1, /* 0x18-0x1f */ 41 | 0x19, -1, 0x15, -1, 0x25, -1, 0x14, -1, /* 0x20-0x27 */ 42 | 0x18, -1, 0x13, -1, 0x23, 0x36, 0x06, -1, /* 0x28-0x2f */ 43 | 0xe048, -1, -1, -1, 0x30, 0xe04d, 0x29, -1, /* 0x30-0x37 */ 44 | 0x35, 0xe051, 0x1e, 0x38, 0x2e, -1, 0x3b, -1, /* 0x38-0x3f */ 45 | 0x0c, -1, 0x16, -1, 0x0a, -1, 0x07, -1, /* 0x40-0x47 */ 46 | 0x43, -1, 0x08, -1, 0x24, -1, 0x3e, -1, /* 0x48-0x4f */ 47 | 0x2b, 0x1c, 0x2c, -1, 0x31, -1, 0x02, -1, /* 0x50-0x57 */ 48 | 0x28, -1, 0x10, 0xe04f, 0x2d, 0x2a, 0x3c, -1, /* 0x58-0x5f */ 49 | 0x1a, 0x0d, 0x20, -1, 0x33, -1, 0x05, -1, /* 0x60-0x67 */ 50 | 0x26, 0x0e, 0x12, -1, 0x22, -1, 0x3d, -1, /* 0x68-0x6f */ 51 | 0xe050, 0xe052, -1, 0x1d, 0x39, 0xe053, 0x0f, -1, /* 0x70-0x77 */ 52 | 0xe04b, 0xe049, 0x3a, 0xe047, 0x2f, -1, 0x01, -1, /* 0x78-0x7f */ 53 | }; 54 | 55 | 56 | #endif // _DRV_IRCOMBO_OSI_ACER_LOCAL_H_INC_ 57 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/sci/sci_inf.h: -------------------------------------------------------------------------------- 1 | /*-----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 2001 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +-----------------------------------------------------------------------------*/ 20 | /*-----------------------------------------------------------------------------+ 21 | | Author: Mike Lepore 22 | | Component: sci 23 | | File: sci_inf.h 24 | | Purpose: Smart Card Interface device driver PUBLIC API header file. 25 | | Changes: 26 | | 27 | | Date: Author Comment: 28 | | ---------- ---------------- ----------------------------------------------- 29 | | 03/26/2001 Zongwei Liu Initial check-in 30 | | 09/26/2001 zongwei Liu Port to pallas 31 | | 10/10/2001 Zongwei Liu Port to OS-Adaption layer 32 | +----------------------------------------------------------------------------*/ 33 | 34 | #ifndef _sci_inf_h_ 35 | #define _sci_inf_h_ 36 | 37 | #include "sci/sci_global.h" 38 | 39 | /*#define SCI_DEBUG_PRINT*/ 40 | /*#define SCI_DEBUG_TRACE*/ 41 | 42 | /* constants */ 43 | #define DEVICE_NAME "sci_dev" 44 | 45 | /* ioctl cmd table */ 46 | #define SCI_IOW_MAGIC 's' 47 | #define IOCTL_SET_RESET _IOW(SCI_IOW_MAGIC, 1, ULONG) 48 | #define IOCTL_SET_MODES _IOW(SCI_IOW_MAGIC, 2, SCI_MODES) 49 | #define IOCTL_GET_MODES _IOW(SCI_IOW_MAGIC, 3, SCI_MODES) 50 | #define IOCTL_SET_PARAMETERS _IOW(SCI_IOW_MAGIC, 4, SCI_PARAMETERS) 51 | #define IOCTL_GET_PARAMETERS _IOW(SCI_IOW_MAGIC, 5, SCI_PARAMETERS) 52 | #define IOCTL_SET_CLOCK_START _IOW(SCI_IOW_MAGIC, 6, ULONG) 53 | #define IOCTL_SET_CLOCK_STOP _IOW(SCI_IOW_MAGIC, 7, ULONG) 54 | #define IOCTL_GET_IS_CARD_PRESENT _IOW(SCI_IOW_MAGIC, 8, ULONG) 55 | #define IOCTL_GET_IS_CARD_ACTIVATED _IOW(SCI_IOW_MAGIC, 9, ULONG) 56 | #define IOCTL_SET_DEACTIVATE _IOW(SCI_IOW_MAGIC, 10, ULONG) 57 | #define IOCTL_SET_ATR_READY _IOW(SCI_IOW_MAGIC, 11, ULONG) 58 | #define IOCTL_GET_ATR_STATUS _IOW(SCI_IOW_MAGIC, 12, ULONG) 59 | #define IOCTL_DUMP_REGS _IOW(SCI_IOW_MAGIC, 20, ULONG) 60 | 61 | /* MAJOR NUM OF DEVICE DRVIER */ 62 | #define MAJOR_NUM 169 63 | 64 | #endif /* _sci_inf_h_ */ 65 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/ir/ir_osi_hitachi.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/include/osi_hitachi_ir.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // OS Independent Hitachi TV/VCR IR remote controller code decoder 25 | //Revision Log: 26 | // Sept/10/2001 Created by YYD 27 | 28 | #ifndef _DRV_INCLUDE_OSI_HITACHI_IR_H_INC_ 29 | #define _DRV_INCLUDE_OSI_HITACHI_IR_H_INC_ 30 | 31 | #include "os/os-types.h" 32 | 33 | // the return code of ir_osi_detect_hitachi_code 34 | #define __IR_HITACHI_REPEAT_CODE 0x66666666 // this should not be a vlaid hitachi code 35 | 36 | // the return code of ir_osi_translate_hitachi_code 37 | #define INVALID_IR_CODE (0xffff) 38 | #define UNKNOWN_IR_CODE (0x0000) 39 | 40 | #define __IR_KEY_DOWN (0x1000) // ORed with the return code 41 | 42 | #define OPTV_VCR_POWER 266 43 | #define OPTV_TV_POWER 261 44 | #define OPTV_MUTE 267 45 | #define OPTV_VOLUP 268 46 | #define OPTV_VOLDOWN 269 47 | #define OPTV_PREVCHVCR 265 48 | #define OPTV_PLAY 264 49 | #define OPTV_REC 272 50 | #define OPTV_STOP 260 51 | #define OPTV_PREVCHTV 265 52 | #define OPTV_PAUSE 273 53 | // not all return codes are defined, please refer back to drv/ircombo/osi_hitachi-local.h 54 | 55 | 56 | // detect and return hitachi TV/VCR ir rc code 57 | // input the GPTC timediff and pCode 58 | int ir_osi_detect_hitachi_code(UINT32 timediff, UINT32 *pCode); 59 | // return 1, code detected and returned by *pCode 60 | // return 0, timing code get correctly 61 | // return -1, timimg code error, detector resetted 62 | 63 | 64 | void ir_osi_reset_hitachi_detector(void); 65 | // reset the detector plus stat 66 | 67 | void ir_osi_get_hitachi_detector_stat(UINT *pCode, UINT *pSync, UINT*pError); 68 | // get machine statistics 69 | 70 | 71 | int ir_osi_process_hitachi_code(UINT32 uCode, void (*handler_call_back)(USHORT uCode)); 72 | // return the number of codes sent on success 73 | // return -1 on code error 74 | 75 | #endif // _DRV_INCLUDE_OSI_HITACHI_IR_H_INC_ 76 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/include/gpt/gpt_atom.h: -------------------------------------------------------------------------------- 1 | //pallas/drv/include/atom_gptc.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | // 23 | //Comment: 24 | // physical layer atom driver of GPT on Pallas 25 | //Revision Log: 26 | // Sept/07/2001 Created by YYD 27 | // Only GPTC is supported 28 | 29 | #ifndef _DRV_INCLUDE_ATOM_GPT_H_INC_ 30 | #define _DRV_INCLUDE_ATOM_GPT_H_INC_ 31 | 32 | #include "os/os-types.h" 33 | 34 | 35 | // gptc attr 36 | #define __GPTC_ENABLE 0x001 // * using interrupt mode 37 | #define __GPTC_DISABLE 0x002 // don't using interrupt mode 38 | 39 | #define __GPTC_FALL_EDGE 0x004 // * detect falling edge 40 | #define __GPTC_RAISE_EDGE 0x008 // detect raising edge 41 | 42 | #define __GPTC_SYNC_CAPT 0x010 // * syncronized capture 43 | #define __GPTC_ASYNC_CAPT 0x020 // asyncronized capture 44 | 45 | typedef enum __GPT_DEVICS_MASK__ 46 | { 47 | __GPT_DEV_CAPT0=0x80000000, 48 | __GPT_DEV_CAPT1=0x40000000, 49 | __GPT_DEV_COMP0=0x00008000, 50 | __GPT_DEV_COMP1=0x00004000, 51 | __GPT_DEV_COMP2=0x00002000, 52 | __GPT_DEV_COMP3=0x00001000, 53 | __GPT_DEV_COMP4=0x00000800, 54 | __GPT_DEV_COMP5=0x00000400, 55 | __GPT_DEV_COMP6=0x00000200 56 | } __GPT_DEV_MASK; 57 | 58 | 59 | 60 | void gpt_atom_init_port(void *pPortBase); 61 | 62 | UINT32 gpt_atom_set_tbc(UINT32 v); 63 | 64 | UINT32 gpt_atom_get_tbc(void); 65 | 66 | void gpt_atom_set_gptc(__GPT_DEV_MASK eCaptN, UINT uAttr); 67 | 68 | UINT32 gpt_atom_get_gptc(__GPT_DEV_MASK eCaptN); 69 | 70 | void gpt_atom_enable_interrupt(__GPT_DEV_MASK eGptDev); 71 | void gpt_atom_disable_interrupt(__GPT_DEV_MASK eGptDev); 72 | 73 | void gpt_atom_mask_interrupt(__GPT_DEV_MASK eGptDev); 74 | void gpt_atom_unmask_interrupt(__GPT_DEV_MASK eGptDev); 75 | 76 | UINT32 gpt_atom_get_interrupt_status(void); 77 | UINT32 gpt_atom_set_interrupt_status(UINT uSet); 78 | UINT32 gpt_atom_reset_interrupt_status(__GPT_DEV_MASK eGptDev); 79 | 80 | 81 | #endif // _DRV_INCLUDE_ATOM_GPT_H_INC_ 82 | -------------------------------------------------------------------------------- /data/html/status.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SAT>IP server $http_host$ 6 | 7 | 8 | 9 | 11 | 35 | 36 | 37 | 38 |
39 |
40 |
41 |
42 | 43 |
44 |

Loading...

45 | 48 |
49 | 50 |
51 |
52 |
53 |
54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/config.make: -------------------------------------------------------------------------------- 1 | ################################################################################## 2 | # config.make 3 | # Configuration file for building IBM STB Linux drivers 4 | ################################################################################## 5 | 6 | ######################################################################################### 7 | # Basic Configs 8 | ######################################################################################### 9 | 10 | #INSTALL_ROOT = $(TOP_DIR)/../target 11 | 12 | # if you have your own target location, please modify the above 13 | # else if you are using a default CDK installation, you may prefer this 14 | INSTALL_ROOT = /opt/hardhat/devkit/ppc/405/target 15 | 16 | 17 | CROSS_COMPILE = /opt/hardhat/devkit/ppc/405/bin/ppc_405- 18 | 19 | LSP_DIR = /opt/hardhat/devkit/lsp/ibm-redwood6-ppc_405/linux-2.4.18_mvl30 20 | #LSP_DIR = /opt/hardhat/devkit/lsp/ibm-redwood6-ppc_405/linux-2.4.17_mvl21 21 | #LSP_DIR = /opt/hardhat/devkit/lsp/ibm-redwood6/linux-2.4.2_hhl20 22 | 23 | BASE_MODCFLAGS = -O2 -Wall -I. -I$(LSP_INCLUDE_DIR) -I$(DRV_INCLUDE_DIR) -DMODULE -D__KERNEL__ -DLINUX \ 24 | -I$(LSP_DIR)/arch/ppc \ 25 | $(EXTRA_CFLAGS) 26 | 27 | 28 | 29 | ################################################################################## 30 | # Directories 31 | ################################################################################## 32 | 33 | TOP_DIR = $(shell pwd) 34 | 35 | LOCALBIN_DIR = $(INSTALL_ROOT)/usr/local/bin 36 | 37 | LSP_INCLUDE_DIR = $(LSP_DIR)/include 38 | 39 | DRV_INCLUDE_DIR = $(TOP_DIR)/include 40 | 41 | EXPORT_DIR = $(TOP_DIR)/export 42 | 43 | 44 | ################################################################################## 45 | # CDK Configs 46 | ################################################################################## 47 | 48 | 49 | AS =$(CROSS_COMPILE)as 50 | LD =$(CROSS_COMPILE)ld 51 | CC =$(CROSS_COMPILE)gcc 52 | CPP =$(CC) -E 53 | AR =$(CROSS_COMPILE)ar 54 | NM =$(CROSS_COMPILE)nm 55 | STRIP =$(CROSS_COMPILE)strip 56 | OBJDUMP =$(CROSS_COMPILE)objdump 57 | 58 | 59 | VER = $(shell awk -F\" '/REL/ {print $$2}' $(LSP_INCLUDE_DIR)/linux/version.h) 60 | 61 | 62 | ######################################################################################### 63 | # Config Exports 64 | ######################################################################################### 65 | 66 | CONFIG_DEFS = INSTALL_ROOT CROSS_COMPILE LSP_DIR \ 67 | TOP_DIR EXPORT_DIR LOCALBIN_DIR LSP_INCLUDE_DIR DRV_INCLUDE_DIR \ 68 | AS LD CC CPP AR NM STRIP OBJDUMP \ 69 | BASE_MODCFLAGS VER 70 | 71 | ######################################################################################### 72 | # Config target 73 | ######################################################################################### 74 | 75 | cfgs = $(foreach abc, $(CONFIG_DEFS),"\\n"$(abc) = $($(abc))"\\n") 76 | all : 77 | @echo -n "Creating config.local ..." 78 | @echo "##############################################################################" > config.local 79 | @echo "# Automatically generated configuration file, please don't edit" >> config.local 80 | @echo "##############################################################################" >> config.local 81 | @echo -e $(cfgs) >> config.local # creat the file contents 82 | @echo " Done" 83 | 84 | 85 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/gfx/Makefile: -------------------------------------------------------------------------------- 1 | #################################################################################### 2 | # gfx makefile 3 | #################################################################################### 4 | 5 | LOCAL_TARGET := gfx.o 6 | 7 | LOCAL_TEST := osdtst.o 8 | 9 | LOCAL_CPP_OPT := 10 | # -D__GFX_INF_HELPER_DEBUG -D__GFX_INF_DEBUG -D__GFX_ATOM_DEBUG \ 11 | # -D__GFX_OSI_DEBUG -D__GFX_SURFACE_DEBUG -D__OSD_ATOM_DEBUG -D__OSD_FB_DEBUG \ 12 | # -D__OSD_OSI_DEBUG 13 | 14 | 15 | include ../config.local 16 | 17 | 18 | OBJS := osd_osi.o osd_atom.o gfx_palette.o gfx_osi_surface.o gfx_osi.o gfx_osi_engine.o gfx_inf_helper.o gfx_inf.o gfx_atom.o 19 | 20 | COMMONHEADERS = $(DRV_INCLUDE_DIR)/os/os-types.h $(DRV_INCLUDE_DIR)/os/drv_debug.h $(DRV_INCLUDE_DIR)/gfx/gfx_common.h 21 | 22 | 23 | 24 | all: $(LOCAL_TARGET) osdfb.o gfxtest 25 | 26 | %.o: %.c 27 | $(CC) $(BASE_MODCFLAGS) $(LOCAL_CPP_OPT) -c -o $@ $< 28 | 29 | $(LOCAL_TARGET) : $(OBJS) 30 | $(LD) -m elf32ppclinux -r -o $@ $^ 31 | 32 | osdfb.o : osd_inf_fb.o 33 | cp osd_inf_fb.o osdfb.o 34 | 35 | osd_inf_fb.o : osd_inf_fb.c \ 36 | $(COMMONHEADERS) \ 37 | osd_osi.h\ 38 | gfx_surface.h 39 | 40 | osd_osi.o : osd_osi.c gfx_osi_local.h \ 41 | osd_atom.h\ 42 | osd_osi.h\ 43 | gfx_surface.h 44 | 45 | osd_atom.o : osd_atom.c osd_dcr.h\ 46 | osd_atom.h 47 | 48 | gfx_palette.o : gfx_palette.c \ 49 | $(COMMONHEADERS) 50 | 51 | 52 | gfx_osi_surface.o : gfx_osi_surface.c \ 53 | $(COMMONHEADERS) \ 54 | $(DRV_INCLUDE_DIR)/os/pm-alloc.h \ 55 | gfx_surface.h 56 | 57 | gfx_osi.o : gfx_osi.c gfx_osi_local.h \ 58 | $(COMMONHEADERS) \ 59 | $(DRV_INCLUDE_DIR)/os/os-sync.h \ 60 | gfx_surface.h \ 61 | gfx_osi.h \ 62 | gfx_osi_engine.h 63 | 64 | gfx_osi_engine.o : gfx_osi_engine.c \ 65 | $(COMMONHEADERS) \ 66 | $(DRV_INCLUDE_DIR)/os/os-sync.h \ 67 | gfx_surface.h \ 68 | gfx_osi.h \ 69 | gfx_osi_engine.h 70 | 71 | gfx_inf_helper.o : gfx_inf_helper.c gfx_inf_helper.h \ 72 | $(COMMONHEADERS) \ 73 | $(DRV_INCLUDE_DIR)/os/os-generic.h \ 74 | gfx_surface.h \ 75 | gfx_osi.h \ 76 | osd_osi.h \ 77 | $(DRV_INCLUDE_DIR)/gfx/gfx_inf_struct.h 78 | 79 | gfx_inf.o : gfx_inf.c gfx_inf_helper.h \ 80 | $(COMMONHEADERS) \ 81 | $(DRV_INCLUDE_DIR)/gfx/gfx_inf_struct.h \ 82 | $(DRV_INCLUDE_DIR)/gfx/gfx_inf.h 83 | 84 | gfx_atom.o : gfx_atom.c gfx_atom.h 85 | 86 | 87 | osd_inf_test.o : osd_inf_test.c 88 | 89 | .PHONY : clean 90 | 91 | test_apps: $(LOCAL_TEST) 92 | 93 | 94 | $(LOCAL_TEST) : osd_inf_test.o 95 | cp osd_inf_test.o $(LOCAL_TEST) 96 | 97 | 98 | gfxtest : 99 | make -C test 100 | 101 | clean : 102 | rm -f $(OBJS) $(LOCAL_TARGET) osdfb.o osd_inf_fb.o osd_inf_test.o $(LOCAL_TEST) 103 | make -C test clean 104 | 105 | 106 | install : $(LOCAL_TARGET) $(LOCAL_TEST) osdfb.o gfxtest 107 | @if [ ! -d $(INSTALL_ROOT)/lib/modules/$(VER)/misc ] ; then \ 108 | echo "Creating target directory : " $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 109 | mkdir -p $(INSTALL_ROOT)/lib/modules/$(VER)/misc ; \ 110 | fi 111 | install $(LOCAL_TARGET) $(INSTALL_ROOT)/lib/modules/$(VER)/misc 112 | install osdfb.o $(INSTALL_ROOT)/lib/modules/$(VER)/misc 113 | install $(LOCAL_TEST) $(INSTALL_ROOT)/lib/modules/$(VER)/misc 114 | make -C test install 115 | 116 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/os/os_inf.c: -------------------------------------------------------------------------------- 1 | //vulcan/drv/os/os_inf.c 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | //Comment: 23 | // Dummy Linux Moduler interface for OS core 24 | //Revision Log: 25 | // Sept/24/2001 Created by YYD 26 | // Jun/03/2002 Modified for segments by YYD 27 | 28 | // The necessary header files 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #include "hw/physical-mem.h" 37 | #include "hw/hardware.h" 38 | #include "os/pm-alloc.h" 39 | #include "os/os-interrupt.h" 40 | #include "os/drv_debug.h" 41 | #include "os/os-io.h" 42 | 43 | 44 | #include "os/pversion.h" 45 | 46 | #ifdef MODULE 47 | MODULE_AUTHOR("IBM CRL"); 48 | #endif 49 | 50 | #ifdef __DRV_FOR_VULCAN__ 51 | #define OS_CORE_DRIVER_NAME "STBx25xx OS-Core" 52 | #ifdef MODULE 53 | MODULE_DESCRIPTION("OS Core support driver for IBM STBx25xx Drivers"); 54 | #endif 55 | #elif defined(__DRV_FOR_PALLAS__) 56 | #define OS_CORE_DRIVER_NAME "STB04xxx OS-Core" 57 | #ifdef MODULE 58 | MODULE_DESCRIPTION("OS Core support driver for IBM STB04xxx Drivers"); 59 | #endif 60 | #elif defined(__DRV_FOR_VESTA__) 61 | #define OS_CORE_DRIVER_NAME "STB03xxx OS-Core" 62 | #ifdef MODULE 63 | MODULE_DESCRIPTION("OS Core support driver for IBM STB04xxx Drivers"); 64 | #endif 65 | #else 66 | #error "Unsupported architecture, please specify it in 'include/hw/hardware.h'" 67 | #endif 68 | 69 | 70 | 71 | static int dummy_inf_init(void) 72 | { 73 | // print the driver verision info for futher reference 74 | PVERSION(OS_CORE_DRIVER_NAME); 75 | 76 | if(__os_alloc_physical_init(__STB_ALLOC_MEM_BASE_ADDR, __STB_ALLOC_MEM_SIZE, __STB_ALLOC_MEM_BASE_ADDR) < 0) 77 | { 78 | PFATAL("PM-alloc failed!\n"); 79 | return -1; 80 | } 81 | if(os_irq_init() < 0) 82 | { 83 | PFATAL("os-interrupt init failed!\n"); 84 | __os_alloc_physical_deinit(); 85 | return -1; 86 | } 87 | 88 | return 0; 89 | } 90 | 91 | static void dummy_inf_deinit(void) 92 | { 93 | __os_alloc_physical_deinit(); 94 | } 95 | 96 | module_init(dummy_inf_init); 97 | module_exit(dummy_inf_deinit); 98 | 99 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/sci/README: -------------------------------------------------------------------------------- 1 | This is a release version of Smart Card Linux device driver 2 | 3 | 1. General information of sci_drv 4 | Major Number of sci_drv = 169 5 | command "mknode /dev/sci0 c 169 0" 6 | "mknode /dev/sci1 c 169 1" 7 | will creat two file nodes 8 | 9 | 2. Files of sci_drv & its test file 10 | 2.1 sci_inf.c The POSIX interface file of sci_drv 11 | sci_osd.c The OS-dependent layer file of sci_drv 12 | sci_osd.h The OS-dependent layer header file of sci_drv 13 | sci_osi.c The OS-independent layer file of sci_drv 14 | sci_osi.h The OS-independent layer header file of sci_drv 15 | sci_atom.c The atom function file od sci_drv 16 | sci_atom.h The atom function header file od sci_drv 17 | sci_local.h The internel parameters and structure define file of sci_drv 18 | 2.2 test/mu_sci.c The test menu file of scit 19 | test/mu_sci.h The header file of test menu 20 | test/sci_prot.c The protocol layer function of scit 21 | test/sci_prot.h The public header file of protocol function 22 | test/sc.h The private header file of protocal fucntion 23 | 2.3 ../include/sci/sci_inf.h The POSIX interface header file of sci_drv 24 | ../include/sci/sci_global.h The public header file of sci_drv 25 | 26 | 3. Usage of scit 27 | 3.1 "sc0" or "sc1" can select the card socket number. You have to do it first. 28 | 3.2 "rt" to reset and get ATR from the card 29 | 3.3 "sf" to send SELECT FILE 0x1005 command. If it response 0x90 0x00 means 30 | successful. If it response 0x6a 0x82 means FILE NOT FOUND. 31 | 3.4 "ur" to enter the ASCII what you want to write to the file 0x1005 32 | 3.5 "rr" to verify if the file update ssuccessful. 33 | 3.6 "sf" must be perform before "ur"/"rr" 34 | 3.7 NOTE: 35 | The card reader MUST be connected to the borad properly. If the card 36 | reader is not present, the SCI regisiter can not reflect the status of 37 | if a card is present. This will result the device driver error. 38 | 39 | 4. Changes 40 | 41 | Date Bug Fixes Affected sources 42 | ----------------------------------------------------------------------------------- 43 | 12/03/2001 Fixed error handling bug in sc_apdu() by sci_prot.c 44 | adding check_incoming_data(). This fixed 45 | incorrect receive length occurring when 46 | card responds with a two byte error-code 47 | instead of the expected number of bytes. 48 | Fixed error handling problem in 49 | sc_t1_command(). 50 | Improved data handling efficiency in 51 | sc_t0_command(). 52 | 53 | 12/13/2001 Move init, uninit, reset, read, write and sci_osd.c, sci_osi.c, 54 | irq handler to the OS-dependent layer. sci_osi_local.c 55 | Merge sci_osi.c and sci_osi_local.c. 56 | 57 | 12/13/2001 EMV2000 support and made several changes sci_atom.c, sci_osi.c, 58 | to improve PIO efficiency. sci_osd.c 59 | 60 | 12/13/2001 Changed SCI_MAX_F to 80000000. sci_global.h 61 | 62 | 12/13/2001 Added EMV2000 defines, TX timeout define sci_local.h 63 | and SCI_DRV_MODES defines. 64 | 65 | 01/11/2002 Add timeout to read/write function sci_osd.c 66 | 67 | 07/04/2002 Add support for Vesta, Pallas and Vulcan sci_atom.c 68 | in one driver file 69 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/ir/ir_atom.h: -------------------------------------------------------------------------------- 1 | //vulcan/drv/ircombo/ir_atom.h 2 | /*----------------------------------------------------------------------------+ 3 | | 4 | | This source code has been made available to you by IBM on an AS-IS 5 | | basis. Anyone receiving this source is licensed under IBM 6 | | copyrights to use it in any way he or she deems fit, including 7 | | copying it, modifying it, compiling it, and redistributing it either 8 | | with or without modifications. No license under IBM patents or 9 | | patent applications is to be implied by the copyright license. 10 | | 11 | | Any user of this software should understand that IBM cannot provide 12 | | technical support for this software and will not be responsible for 13 | | any consequences resulting from the use of this software. 14 | | 15 | | Any person who transfers this source code or any derivative work 16 | | must include the IBM copyright notice, this paragraph, and the 17 | | preceding two paragraphs in the transferred software. 18 | | 19 | | COPYRIGHT I B M CORPORATION 1998 20 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 21 | +----------------------------------------------------------------------------*/ 22 | //Comment: 23 | // IR driver for STBx25xx 24 | //Revision Log: 25 | // Jun/03/2002 Created by YYD 26 | 27 | #ifndef __IR_ATOM_H__ 28 | #define __IR_ATOM_H__ 29 | 30 | #define _IR_INT_LINE 10 // irq 10 is used for IRR in vulcan 31 | 32 | #define _IR_IRR0_INT_FIFOS 0x80000000 33 | #define _IR_INT_FIFO_LEVEL 0x40000000 34 | #define _IR_INT_FIFO_TIMEOUT 0x20000000 35 | #define _IR_INT_FIFO_OVERFLOW 0x10000000 36 | #define _IR_IRR0_CNTL_ENIR 0x08000000 37 | #define _IR_INT_STAT_MASK (_IR_INT_FIFO_OVERFLOW | _IR_INT_FIFO_TIMEOUT |_IR_INT_FIFO_LEVEL) 38 | 39 | #define _IR_MAX_FIFO_LEVEL 31 40 | 41 | #define _IR_SAMPLE_BASE_FREQ (63*1000*1000) 42 | 43 | #define _IR_MAX_SAMPLE_CLOCK _IR_SAMPLE_BASE_FREQ // 63 MHz 44 | 45 | #define _IR_MIN_SAMPLE_CLOCK ((_IR_SAMPLE_BASE_FREQ+255)/256) // max 256 divisor 46 | 47 | #define _IR_MAX_SAMPLE_LENGTH 65535 // 65535 clocks 48 | 49 | // port = 0, 1, positive_polarity = 0, 1 50 | void ir_atom_init(UINT port, UINT positive_polarity,UINT32 sample_clock); 51 | 52 | // return the actual sample frequency been set 53 | UINT32 ir_atom_set_sampling_clock(UINT32 uFreqHz); 54 | 55 | // set time out 56 | INT ir_atom_set_timeout(UINT32 uClocks); 57 | 58 | // enable ir 59 | void ir_atom_enable_ir(void); 60 | void ir_atom_disable_ir(void); 61 | 62 | // return current enabled int flags 63 | UINT32 ir_atom_enable_int(UINT32 uFlags); 64 | UINT32 ir_atom_disable_int(UINT32 uFlags); 65 | 66 | // return current int req status 67 | UINT32 ir_atom_get_int_status(void); 68 | 69 | // clear correspondent int req status 70 | UINT32 ir_atom_clear_int_status(UINT32 uFlags); 71 | 72 | // set the fifo trigger level 73 | INT ir_atom_set_fifo_trigger_level(UINT32 uFifoLevel); 74 | 75 | // get current in fifo count 76 | UINT ir_atom_get_fifo_level(void); 77 | 78 | // fetch codes out of fifo 79 | // return number of codes get 80 | //UINT ir_atom_get_codes(UINT32 *pFullWidth, UINT32 *pPulseWidth, UINT uMaxCodes); 81 | UINT ir_atom_get_codes(UINT32 *pPulse, UINT uMaxCodes); 82 | 83 | // restart ir receiver by stop then start 84 | void ir_atom_restart(void); 85 | 86 | 87 | #endif //__IR_ATOM_H__ 88 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/xp_osi_clk.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1998 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author : Ian Govett 22 | | Component : xp 23 | | File : xp_clk.h 24 | | Purpose : xp_clk declarations and prototypes 25 | | Changes : 26 | | 27 | | Date: By Comment: 28 | | --------- --- -------- 29 | | IG Created 30 | | 30-Sep-01 LGH Ported to Linux 31 | +----------------------------------------------------------------------------*/ 32 | 33 | #ifndef XP_CLK_H 34 | 35 | #define XP_CLK_H 36 | 37 | typedef enum _XP_STC_EVENT 38 | { 39 | STC_FIRED = 0, 40 | STC_DISCONTINUITY, 41 | STC_PRESENT, 42 | STC_REMOVED, 43 | STC_FATAL_ERROR 44 | } XP_STC_EVENT; 45 | 46 | typedef struct _STC_TYPE 47 | { 48 | ULONG base_time1; 49 | ULONG base_time2; 50 | } STC_TYPE; 51 | 52 | typedef void (*XP_STC_NOTIFY_FN)(GLOBAL_RESOURCES *pGlobal,XP_STC_EVENT stc_event); 53 | 54 | /*----------------------------------------------------------------------------+ 55 | 56 | | Type Definitions 57 | 58 | +----------------------------------------------------------------------------*/ 59 | 60 | typedef struct xp_clk_status_type 61 | 62 | { 63 | 64 | unsigned Incons_data; /* Inconsistent data was read */ 65 | 66 | unsigned Errors; /* Number of errors detected */ 67 | 68 | } XP_CLK_STATUS_TYPE, *XP_CLK_STATUS_PTR; 69 | 70 | 71 | 72 | //External 73 | 74 | SHORT xp_osi_clk_get_stc_high(GLOBAL_RESOURCES *pGlobal,ULONG *pStcHigh); 75 | 76 | SHORT xp_osi_clk_init(GLOBAL_RESOURCES *pGlobal); 77 | 78 | 79 | 80 | //APIs 81 | 82 | void xp_osi_clk_get_errors(GLOBAL_RESOURCES *pGlobal,XP_CLK_STATUS_PTR pClkStatus); 83 | 84 | void xp_osi_clk_set_pid(GLOBAL_RESOURCES *pGlobal,USHORT uwPid); 85 | 86 | SHORT xp_osi_clk_start(GLOBAL_RESOURCES *pGlobal); 87 | 88 | void xp_osi_clk_stop(GLOBAL_RESOURCES *pGlobal); 89 | 90 | int xp_osi_clk_set_stc_compare(GLOBAL_RESOURCES *pGlobal,ULONG stc_high); 91 | int xp_osi_clk_set_stc_event_notify(GLOBAL_RESOURCES *pGlobal,XP_STC_NOTIFY_FN notify_fn); 92 | int xp_osi_clk_release_stc_event(GLOBAL_RESOURCES *pGlobal); 93 | void stc_interrupt(GLOBAL_RESOURCES *pGlobal,ULONG ulInterrupt); 94 | void first_pcr_interrupt(GLOBAL_RESOURCES *pGlobal,ULONG ulInterrupt); 95 | 96 | void xp_osi_clk_get_current_stc(GLOBAL_RESOURCES *pGlobal,STC_TYPE *stc_type); 97 | #endif 98 | 99 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/pvr_atom_register.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1998 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author: Lin Guo Hui 22 | | Component: PVR 23 | | File: pvr_atom_reg.h 24 | | Purpose: Transport defines. 25 | | 26 | | Changes: 27 | | Date: Author Comment: 28 | | --------- ------ -------- 29 | | 30 | +----------------------------------------------------------------------------*/ 31 | 32 | #ifndef PCR_REG_H 33 | 34 | #define PVR_REG_H 35 | 36 | 37 | 38 | #pragma pack(1) 39 | 40 | 41 | 42 | /*----------------------------------------------------------------------------+ 43 | | Register Defines 44 | +----------------------------------------------------------------------------*/ 45 | #define PVR_PLAYBACK_MODE_SEL 1 46 | #define PVR_PLAYBACK_LINE_MODE 2 47 | #define PVR_PLAYBACK_START_DMA 1 48 | #define PVR_DMA_COMPLETE 1 49 | #define PVR_STAT_BUF_NOT_EMPTY 2 50 | #define PVR_STAT_BUF_FULL 1 51 | /*----------------------------------------------------------------------------+ 52 | | CONFIGURATION REGISTER 53 | | Location Address: 0x02c0 54 | +----------------------------------------------------------------------------*/ 55 | typedef struct PVR_config_type 56 | { 57 | unsigned res :31; 58 | unsigned PVRCONFI :1; //PVR playback mode select, 1: select 0: not select 59 | } PVR_CONFIG_REG, *PVR_CONFIG_REGP; 60 | 61 | /*----------------------------------------------------------------------------+ 62 | | PVR START REGISTER 63 | | Location Address: 0x02c1 64 | +----------------------------------------------------------------------------*/ 65 | typedef struct PVR_start_type 66 | { 67 | 68 | unsigned res :30; 69 | unsigned line :1; //0: PVR playback word mode(4-byte transfer) 70 | //1: PVR playback line mode(32-byte transfer) 71 | 72 | unsigned start :1; //PVR start DMA, 0: no transfer 1:start transfer 73 | 74 | } PVR_START_REG, *PVR_START_REGP; 75 | 76 | /*------------------------------------------------------------------------------+ 77 | | PVR play back transfer count 78 | | Location Address: 0x2c7 79 | +-------------------------------------------------------------------------------*/ 80 | typedef struct PVR_playback_count 81 | { 82 | unsigned res :16; 83 | unsigned count :16; 84 | } PVR_COUNT_REG, *PVR_COUNT_REGP; 85 | 86 | #pragma pack() 87 | #endif 88 | 89 | 90 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/aud/aud_osi_mixer.c: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1997, 1999, 2001 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author: Ling shao 22 | | File: aud_osi.c 23 | | Purpose: audio driver osi layer PALLAS 24 | | Changes: 25 | | Date: Comment: 26 | | ----- -------- 27 | | 15-Oct-01 create SL 28 | +----------------------------------------------------------------------------*/ 29 | #include 30 | #include 31 | #include "aud_osi.h" 32 | 33 | extern ADEC _adec; 34 | 35 | INT aud_osi_init_mixer(ULONG ulMixerBufPhyAdr, ULONG ulMixerBufLen) 36 | { 37 | if(_adec.uOpenFlag == 0) 38 | { 39 | PDEBUG("audio decoder not initialized\n"); 40 | return -1; 41 | } 42 | _adec.ulMixerBufPhyAdr = ulMixerBufPhyAdr; 43 | _adec.ulMixerBufLen = ulMixerBufLen; 44 | 45 | aud_atom_init_mixer(); 46 | 47 | //create clip device 48 | if(ulMixerBufLen%(AUD_CLIP_QUEUE_SIZE*256) != 0) 49 | { 50 | PDEBUG("clip buffer not 4k aligned \n"); 51 | return -1; 52 | } 53 | 54 | if((_adec.mixer = clipdev_create(ulMixerBufLen / AUD_CLIP_QUEUE_SIZE, 55 | AUD_CLIP_QUEUE_SIZE, 56 | aud_osi_mixer_write, 57 | aud_atom_mixer_buf_ready)) == NULL) 58 | { 59 | PDEBUG("create clip device error\n"); 60 | return -1; 61 | } 62 | return 0; 63 | } 64 | 65 | void aud_osi_close_mixer() 66 | { 67 | PDEBUG("close mixer\n"); 68 | aud_atom_close_mixer(); 69 | //delete clip device 70 | if(_adec.mixer) 71 | { 72 | clipdev_delete(_adec.mixer); 73 | _adec.mixer = NULL; 74 | } 75 | } 76 | 77 | INT aud_osi_mixer_write(CLIPINFO *info) 78 | { 79 | //clip start address = clip base physical address + start offset 80 | info->uClipAdrOff += _adec.ulMixerBufPhyAdr; 81 | aud_atom_mixer_write(info); 82 | return 0; 83 | } 84 | 85 | int aud_osi_set_mixer_fmt(AUD_PCM_FORMAT_CONFIG *pcm_fmt) 86 | { 87 | return aud_atom_set_mixer_fmt(pcm_fmt); 88 | } 89 | 90 | INT aud_osi_set_mixer_vol(AUDVOL *vol) 91 | { 92 | aud_atom_set_vol(vol); 93 | return 0; 94 | } 95 | INT aud_osi_get_mixer_vol(AUDVOL *vol) 96 | { 97 | aud_atom_get_vol(vol); 98 | return 0; 99 | } 100 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/pvr_atom_reg.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1998 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author: Lin Guo Hui 22 | | Component: PVR 23 | | File: pvr_atom_reg.h 24 | | Purpose: PVR register defines. 25 | | 26 | | Changes: 27 | | Date: Author Comment: 28 | | --------- ------ -------- 29 | | 10-Oct-01 LGH Creat 30 | +----------------------------------------------------------------------------*/ 31 | 32 | #ifndef PCR_REG_H 33 | #define PVR_REG_H 34 | 35 | #pragma pack(1) 36 | /*----------------------------------------------------------------------------+ 37 | | Register Defines 38 | +----------------------------------------------------------------------------*/ 39 | #define PVR_PLAYBACK_MODE_SEL 1 40 | #define PVR_PLAYBACK_LINE_MODE 2 41 | #define PVR_PLAYBACK_START_DMA 1 42 | #define PVR_STAT_BUF_NOT_EMPTY 2 43 | #define PVR_STAT_BUF_FULL 1 44 | 45 | #define PVR_INT_EN 0x80 46 | #define PVR_INT_MASK 0x01 47 | /*----------------------------------------------------------------------------+ 48 | | CONFIGURATION REGISTER 49 | | Location Address: 0x02c0 50 | +----------------------------------------------------------------------------*/ 51 | typedef struct PVR_config_type 52 | { 53 | unsigned res :31; 54 | unsigned PVRCONFI :1; //PVR playback mode select, 1: select 0: not select 55 | } PVR_CONFIG_REG, *PVR_CONFIG_REGP; 56 | 57 | /*----------------------------------------------------------------------------+ 58 | | PVR START REGISTER 59 | | Location Address: 0x02c1 60 | +----------------------------------------------------------------------------*/ 61 | typedef struct PVR_start_type 62 | { 63 | 64 | unsigned res :30; 65 | unsigned line :1; //0: PVR playback word mode(4-byte transfer) 66 | //1: PVR playback line mode(32-byte transfer) 67 | 68 | unsigned start :1; //PVR start DMA, 0: no transfer 1:start transfer 69 | 70 | } PVR_START_REG, *PVR_START_REGP; 71 | 72 | /*------------------------------------------------------------------------------+ 73 | | PVR play back transfer count 74 | | Location Address: 0x2c7 75 | +-------------------------------------------------------------------------------*/ 76 | typedef struct PVR_playback_count 77 | { 78 | unsigned res :16; 79 | unsigned count :16; 80 | } PVR_COUNT_REG, *PVR_COUNT_REGP; 81 | 82 | #pragma pack() 83 | #endif 84 | 85 | 86 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/scp/xilinx.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1997, 1999, 2001, 2003 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*----------------------------------------------------------------------------+ 21 | | Author: Mark Detrick 22 | | Component: scp 23 | | File: xilinx.h 24 | | Purpose: xilinx functions for serial control port 25 | | Changes: 26 | | 27 | | Date: Author Comment: 28 | | ---------- ---------------- ----------------------------------------------- 29 | | 09/19/2003 MSD Created. 30 | +----------------------------------------------------------------------------*/ 31 | 32 | #ifndef _xilinx_h_ 33 | #define _xilinx_h_ 34 | 35 | /*----------------------------------------------------------------------------+ 36 | | SCP_CHIP_SELECT(). 37 | +----------------------------------------------------------------------------*/ 38 | void xilinx_sflash_chip_select(); 39 | 40 | /*----------------------------------------------------------------------------+ 41 | | SCP_CHIP_DESELECT(). 42 | +----------------------------------------------------------------------------*/ 43 | void xilinx_sflash_chip_deselect(); 44 | 45 | /*----------------------------------------------------------------------------+ 46 | | ENABLE_SCP_BUS(). 47 | +----------------------------------------------------------------------------*/ 48 | void xilinx_enable_scp_bus(); 49 | 50 | /*----------------------------------------------------------------------------+ 51 | | DISABLE_SCP_BUS(). 52 | +----------------------------------------------------------------------------*/ 53 | void xilinx_disable_scp_bus(); 54 | 55 | /*----------------------------------------------------------------------------+ 56 | | Write Protect 57 | +----------------------------------------------------------------------------*/ 58 | void xilinx_sflash_wp_on(); 59 | 60 | /*----------------------------------------------------------------------------+ 61 | | Reset Serial Flash(). 62 | +----------------------------------------------------------------------------*/ 63 | void xilinx_sflash_wp_off(); 64 | 65 | /*----------------------------------------------------------------------------+ 66 | | Reset Serial Flash(). 67 | +----------------------------------------------------------------------------*/ 68 | void xilinx_sflash_reset_on(); 69 | 70 | /*----------------------------------------------------------------------------+ 71 | | Reset Serial Flash(). 72 | +----------------------------------------------------------------------------*/ 73 | void xilinx_sflash_reset_off(); 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | #endif 84 | -------------------------------------------------------------------------------- /docs/stbx25xx-driver/demux/xp_osi_key.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------+ 2 | | This source code has been made available to you by IBM on an AS-IS 3 | | basis. Anyone receiving this source is licensed under IBM 4 | | copyrights to use it in any way he or she deems fit, including 5 | | copying it, modifying it, compiling it, and redistributing it either 6 | | with or without modifications. No license under IBM patents or 7 | | patent applications is to be implied by the copyright license. 8 | | 9 | | Any user of this software should understand that IBM cannot provide 10 | | technical support for this software and will not be responsible for 11 | | any consequences resulting from the use of this software. 12 | | 13 | | Any person who transfers this source code or any derivative work 14 | | must include the IBM copyright notice, this paragraph, and the 15 | | preceding two paragraphs in the transferred software. 16 | | 17 | | COPYRIGHT I B M CORPORATION 1998 18 | | LICENSED MATERIAL - PROGRAM PROPERTY OF I B M 19 | +----------------------------------------------------------------------------*/ 20 | /*-----------------------------------------------------------------------------+ 21 | | Author: Ian Govett 22 | | Component: xp 23 | | File: xp_osi_key.h 24 | | Purpose: Transport key defines and prototypes. 25 | | Changes: 26 | | 27 | | Date: Author Comment: 28 | | --------- ------ -------- 29 | | 04-May-01 TJC Updates for Pallas. 30 | | 30-Sep-01 LGH Ported to Linux 31 | +-----------------------------------------------------------------------------*/ 32 | #ifndef XP_KEY_H 33 | #define XP_KEY_H 34 | 35 | /*----------------------------------------------------------------------------+ 36 | | Local Defines 37 | +----------------------------------------------------------------------------*/ 38 | #define XP_KEY_INDEX_COUNT 6 39 | #define XP_KEYSET_COUNT 8 /* number of descrambler key sets */ 40 | 41 | /*----------------------------------------------------------------------------+ 42 | | Type Declarations 43 | +----------------------------------------------------------------------------*/ 44 | typedef enum xp_key_index { 45 | XP_KEY_INDEX_INIT_A = 0, /* Key Set array indices */ 46 | XP_KEY_INDEX_INIT_B = 1, 47 | XP_KEY_INDEX_ODD_A = 2, 48 | XP_KEY_INDEX_ODD_B = 3, 49 | XP_KEY_INDEX_EVEN_A = 4, 50 | XP_KEY_INDEX_EVEN_B = 5, 51 | } XP_KEY_INDEX; 52 | 53 | typedef enum xp_key_type { /* Types of descrambler keys */ 54 | XP_KEY_TYPE_INIT = 0, 55 | XP_KEY_TYPE_EVEN = 1, 56 | XP_KEY_TYPE_ODD = 2, 57 | } XP_KEY_TYPE; 58 | 59 | typedef struct xp_key_table { /* Key Set Table Elements */ 60 | unsigned long init_a; 61 | unsigned long init_b; 62 | unsigned long even_a; 63 | unsigned long even_b; 64 | unsigned long odd_a; 65 | unsigned long odd_b; 66 | } XP_KEY_TABLE; 67 | 68 | /*----------------------------------------------------------------------------+ 69 | | Prototype Definitions 70 | +----------------------------------------------------------------------------*/ 71 | SHORT xp_osi_key_get(GLOBAL_RESOURCES *pGlobal,SHORT wId, 72 | XP_KEY_TYPE keytype,ULONG *pKey); 73 | 74 | SHORT xp_osi_key_getall(GLOBAL_RESOURCES *pGlobal,SHORT wId, 75 | XP_KEY_TABLE *pKey); 76 | 77 | SHORT xp_osi_key_set(GLOBAL_RESOURCES *pGlobal, SHORT wId, 78 | XP_KEY_TYPE keytype, ULONG *pKey); 79 | 80 | SHORT xp_osi_key_setall(GLOBAL_RESOURCES *pGlobal, SHORT wId, 81 | XP_KEY_TABLE *pKey); 82 | 83 | #endif 84 | --------------------------------------------------------------------------------