Skip to contentSkip to conversation

MXS: Add static annotations to dma driver

RFC PATCH New Marek Vasut 2 participants 5 messages Nov 22, 2011 – Nov 25, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 MXS: Add static annotations to dma driver

Some functions were internal to the apbh dma driver, so annotate them static. Some of the functions weren't used at all so drop them. This makes the U-Boot binary smaller by about 1500 bytes.

Cc Stefano Babic <[email protected]>
Cc Wolfgang Denk <[email protected]>
---
 arch/arm/include/asm/arch-mx28/dma.h |   25 ----
 drivers/dma/apbh_dma.c               |  211 ++++++++-------------------------
 2 files changed, 51 insertions(+), 185 deletions(-)

NOTE: I still need to test if this patch didn't break anything. Stefano, please hold on with applying.

arch/arm/include/asm/arch-mx28/dma.h +0 -25
index 7061e7c..52747e2 100644
@@ -135,36 +135,11 @@ struct mxs_dma_chan {
 	struct list_head done;
 };
 
-/* Hardware management ops */
-int mxs_dma_enable(int channel);
-int mxs_dma_disable(int channel);
-int mxs_dma_reset(int channel);
-int mxs_dma_freeze(int channel);
-int mxs_dma_unfreeze(int channel);
-int mxs_dma_read_semaphore(int channel);
-int mxs_dma_enable_irq(int channel, int enable);
-int mxs_dma_irq_is_pending(int channel);
-int mxs_dma_ack_irq(int channel);
-
-/* Channel management ops */
-int mxs_dma_request(int channel);
-int mxs_dma_release(int channel);
-
-/* Descriptor management ops */
 struct mxs_dma_desc *mxs_dma_desc_alloc(void);
 void mxs_dma_desc_free(struct mxs_dma_desc *);
-
-unsigned int mxs_dma_cmd_address(struct mxs_dma_desc *desc);
-int mxs_dma_desc_pending(struct mxs_dma_desc *pdesc);
-
 int mxs_dma_desc_append(int channel, struct mxs_dma_desc *pdesc);
 
-int mxs_dma_get_finished(int channel, struct list_head *head);
-int mxs_dma_finish(int channel, struct list_head *head);
-
-int mxs_dma_wait_complete(uint32_t timeout, unsigned int chan);
 int mxs_dma_go(int chan);
-
 int mxs_dma_init(void);
 
 #endif	/* __DMA_H__ */
drivers/dma/apbh_dma.c +51 -160

298 lines not on this page · raw message

Signature · 1 line
1.7.7.1
#1 lore raw

RFC PATCH 1/1 MXS: Add static annotations to dma driver

Quoted 7 lines

Some functions were internal to the apbh dma driver, so annotate them static. Some of the functions weren't used at all so drop them. This makes the U-Boot binary smaller by about 1500 bytes.

Cc Stefano Babic <[email protected]>
Cc Wolfgang Denk <[email protected]>

Stefano, can you please apply ?

M

#2 lore raw

PATCH v2 1/1 MXS: Add static annotations to dma driver

In reply to Marek Vasut

Some functions were internal to the apbh dma driver, so annotate them static. Some of the functions weren't used at all so drop them. This makes the U-Boot binary smaller by about 1500 bytes.

Cc Stefano Babic <[email protected]>
Cc Wolfgang Denk <[email protected]>
---
 arch/arm/include/asm/arch-mx28/dma.h |   25 ----
 drivers/dma/apbh_dma.c               |  209 ++++++++--------------------------
 2 files changed, 50 insertions(+), 184 deletions(-)

V2: Drop the RFC annotation of the patch

arch/arm/include/asm/arch-mx28/dma.h +0 -25
index 7061e7c..52747e2 100644
@@ -135,36 +135,11 @@ struct mxs_dma_chan {
 	struct list_head done;
 };
 
-/* Hardware management ops */
-int mxs_dma_enable(int channel);
-int mxs_dma_disable(int channel);
-int mxs_dma_reset(int channel);
-int mxs_dma_freeze(int channel);
-int mxs_dma_unfreeze(int channel);
-int mxs_dma_read_semaphore(int channel);
-int mxs_dma_enable_irq(int channel, int enable);
-int mxs_dma_irq_is_pending(int channel);
-int mxs_dma_ack_irq(int channel);
-
-/* Channel management ops */
-int mxs_dma_request(int channel);
-int mxs_dma_release(int channel);
-
-/* Descriptor management ops */
 struct mxs_dma_desc *mxs_dma_desc_alloc(void);
 void mxs_dma_desc_free(struct mxs_dma_desc *);
-
-unsigned int mxs_dma_cmd_address(struct mxs_dma_desc *desc);
-int mxs_dma_desc_pending(struct mxs_dma_desc *pdesc);
-
 int mxs_dma_desc_append(int channel, struct mxs_dma_desc *pdesc);
 
-int mxs_dma_get_finished(int channel, struct list_head *head);
-int mxs_dma_finish(int channel, struct list_head *head);
-
-int mxs_dma_wait_complete(uint32_t timeout, unsigned int chan);
 int mxs_dma_go(int chan);
-
 int mxs_dma_init(void);
 
 #endif	/* __DMA_H__ */
drivers/dma/apbh_dma.c +50 -159

290 lines not on this page · raw message

Signature · 1 line
1.7.7.1
#3 lore raw

PATCH v2 1/1 MXS: Add static annotations to dma driver

Quoted 8 lines · Marek Vasut

Some functions were internal to the apbh dma driver, so annotate them static. Some of the functions weren't used at all so drop them. This makes the U-Boot binary smaller by about 1500 bytes.

Cc Stefano Babic <[email protected]>
Cc Wolfgang Denk <[email protected]>

---

You only dropped unused functions and add static to internal functions - this is a cleanup patch and it is ok for me.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#4 lore raw

PATCH v2 1/1 MXS: Add static annotations to dma driver

In reply to Marek Vasut
Quoted 8 lines · Marek Vasut

Some functions were internal to the apbh dma driver, so annotate them static. Some of the functions weren't used at all so drop them. This makes the U-Boot binary smaller by about 1500 bytes.

Cc Stefano Babic <[email protected]>
Cc Wolfgang Denk <[email protected]>

---

Applied to u-boot-imx, thanks

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================