/* * driver for Earthsoft PT1/PT2 * * Copyright (C) 2009 HIRANO Takahito <hiranotaka@zng.info> * * based on pt1dvr - http://pt1dvr.sourceforge.jp/ * by Tomoaki Ishikawa <tomy@users.sourceforge.jp> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */#include<linux/kernel.h>#include<linux/sched.h>#include<linux/sched/signal.h>#include<linux/hrtimer.h>#include<linux/delay.h>#include<linux/module.h>#include<linux/slab.h>#include<linux/vmalloc.h>#include<linux/pci.h>#include<linux/kthread.h>#include<linux/freezer.h>#include<linux/ratelimit.h>#include<linux/string.h>#include<linux/i2c.h>#include<media/dvbdev.h>#include<media/dvb_demux.h>#include<media/dmxdev.h>#include<media/dvb_net.h>#include<media/dvb_frontend.h>#include"tc90522.h"#include"qm1d1b0004.h"#include"dvb-pll.h"#define DRIVER_NAME "earth-pt1"#define PT1_PAGE_SHIFT 12#define PT1_PAGE_SIZE (1 << PT1_PAGE_SHIFT)#define PT1_NR_UPACKETS 1024#define PT1_NR_BUFS 511structpt1_buffer_page{__le32upackets[PT1_NR_UPACKETS];};structpt1_table_page{__le32next_pfn;__le32buf_pfns[PT1_NR_BUFS];};structpt1_buffer{structpt1_buffer_page*page;dma_addr_taddr;};structpt1_table{structpt1_table_page*page;dma_addr_taddr;structpt1_bufferbufs[PT1_NR_BUFS];};enumpt1_fe_clk