[U-Boot] [PATCH] Canyonlands SATA harddisk driver

Kazuaki Ichinohe kazuichi at fsi.co.jp
Tue Jun 2 02:28:55 CEST 2009


Hello Kuribayashi-san,

 >Please make sure I'm not talking about register definition structures.
 >They're harmless, and no need to be cleaned up.

The definition of the register of DMA is the following.
However, the structure is used a little for the usage in which DMA is disabled.

struct dmareg {
	u32 low;
	u32 high;
};

struct dma_chan_regs {
	struct dmareg sar;
	struct dmareg dar;
	struct dmareg llp;
	struct dmareg ctl;
	struct dmareg sstat;
	struct dmareg dstat;
	struct dmareg sstatar;
	struct dmareg dstatar;
	struct dmareg cfg;
	struct dmareg sgr;
	struct dmareg dsr;
};

struct dma_interrupt_regs {
	struct dmareg tfr;
	struct dmareg block;
	struct dmareg srctran;
	struct dmareg dsttran;
	struct dmareg error;
};

struct ahb_dma_regs {
	struct dma_chan_regs		chan_regs[DMA_NUM_CHAN_REGS];
	struct dma_interrupt_regs		interrupt_raw;
	struct dma_interrupt_regs		interrupt_status;
	struct dma_interrupt_regs		interrupt_mask;
	struct dma_interrupt_regs		interrupt_clear;
	struct dmareg			statusInt;
	struct dmareg			rq_srcreg;
	struct dmareg			rq_dstreg;
	struct dmareg			rq_sgl_srcreg;
	struct dmareg			rq_sgl_dstreg;
	struct dmareg			rq_lst_srcreg;
	struct dmareg			rq_lst_dstreg;
	struct dmareg			dma_cfg;
	struct dmareg			dma_chan_en;
	struct dmareg			dma_id;
	struct dmareg			dma_test;
	struct dmareg			res1;
	struct dmareg			res2;
	/* DMA Comp Params
	 * Param 6 = dma_param[0], Param 5 = dma_param[1],
	 * Param 4 = dma_param[2] ...
	 */
	struct dmareg			dma_params[6];
};


 >But, other local, private, resource management structures are encouraged
 >to be shrinked/optimized, as it's just waste of ROM space.

Originally U-boot of PowerPC is not importance for the size because the size is large.
I will point out and object about you.
It is important to maintain interchangeability with the Linux kernel driver.
It is important that maintenance is good.

Regards,
Kazuaki Ichinohe


Shinya Kuribayashi wrote:
> Kazuaki Ichinohe wrote:
>> DMA function was scheduled to be developed as my schedule.
>> However, the development of the DMA function is discontinued once now.
>> The structure of the register that controls DMA has not been used any 
>> longer.
>> I will e-mail the source code ( removed the struct of DMA register ) 
>> later.
> 
> Please make sure I'm not talking about register definition structures.
> They're harmless, and no need to be cleaned up.
> 
> But, other local, private, resource management structures are encouraged
> to be shrinked/optimized, as it's just waste of ROM space.
> 



More information about the U-Boot mailing list