Skip to content

Commit

Permalink
mtk-drivers: ccu: stop dumping i2c
Browse files Browse the repository at this point in the history
* YOU ARE A WASTE OF MEMORY
* WHY IS THIS DONE ON PRODUCTION BUILDS?
* WHY IS THIS USING pr_info FOR DUMPS?

Signed-off-by: Vaisakh Murali <vaisakhmurali@gmail.com>
Signed-off-by: Gagan Malvi <malvi@aospa.co>
Signed-off-by: Azuki <id_azuki@protonmail.com>
  • Loading branch information
mvaisakh authored and Hadenix committed Feb 2, 2024
1 parent a490482 commit dfcf28c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions drivers/misc/mediatek/ccu/src/1.1/ccu_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ static void ccu_i2c_dump_info(struct mt_i2c *i2c)
{
/* I2CFUC(); */
/* int val=0; */
pr_info("i2c_dump_info ++++++++++++++++++++++++++++++++++++++++++\n");
pr_info("base address 0x%p\n", i2c->base);
pr_info("I2C register:\n"
pr_debug("i2c_dump_info ++++++++++++++++++++++++++++++++++++++++++\n");
pr_debug("base address 0x%p\n", i2c->base);
pr_debug("I2C register:\n"
I2CTAG "SLAVE_ADDR=%x,INTR_MASK=%x,INTR_STAT=%x,"
I2CTAG "CONTROL=%x,TRANSFER_LEN=%x\n"
I2CTAG "TRANSAC_LEN=%x,DELAY_LEN=%x,"
Expand All @@ -467,7 +467,7 @@ static void ccu_i2c_dump_info(struct mt_i2c *i2c)
(i2c_readw(i2c, 0x200 + OFFSET_EXT_CONF)),
(i2c_readw(i2c, 0x200 + OFFSET_TRANSFER_LEN_AUX)));

pr_info("DMA register(0x%p):\n"
pr_debug("DMA register(0x%p):\n"
I2CTAG "INT_FLAG=%x,INT_EN=%x,EN=%x,RST=%x,\n"
I2CTAG "STOP=%x,FLUSH=%x,CON=%x,TX_MEM_ADDR=%x, RX_MEM_ADDR=%x\n"
I2CTAG "TX_LEN=%x,RX_LEN=%x,INT_BUF_SIZE=%x,DEBUG_STATUS=%x\n"
Expand All @@ -488,7 +488,7 @@ static void ccu_i2c_dump_info(struct mt_i2c *i2c)
(i2c_readl_dma(i2c, 0x80 + OFFSET_DEBUG_STA)),
(i2c_readl_dma(i2c, 0x80 + OFFSET_TX_MEM_ADDR2)),
(i2c_readl_dma(i2c, 0x80 + OFFSET_RX_MEM_ADDR2)));
pr_info("i2c_dump_info ------------------------------------------\n");
pr_debug("i2c_dump_info ------------------------------------------\n");

}

Expand Down
10 changes: 5 additions & 5 deletions drivers/misc/mediatek/ccu/src/1.2/ccu_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ static void ccu_i2c_dump_info(struct mt_i2c *i2c)
{
/* I2CFUC(); */
/* int val=0; */
pr_info("i2c_dump_info ++++++++++++++++++++++++++++++++++++++++++\n");
pr_info("base address 0x%p\n", i2c->base);
pr_info("I2C register:\n"
pr_debug("i2c_dump_info ++++++++++++++++++++++++++++++++++++++++++\n");
pr_debug("base address 0x%p\n", i2c->base);
pr_debug("I2C register:\n"
I2CTAG "SLAVE_ADDR=%x,INTR_MASK=%x,INTR_STAT=%x,"
I2CTAG "CONTROL=%x,TRANSFER_LEN=%x\n"
I2CTAG "TRANSAC_LEN=%x,DELAY_LEN=%x,"
Expand All @@ -359,7 +359,7 @@ static void ccu_i2c_dump_info(struct mt_i2c *i2c)
(i2c_readw(i2c, 0x200 + OFFSET_EXT_CONF)),
(i2c_readw(i2c, 0x200 + OFFSET_TRANSFER_LEN_AUX)));

pr_info("DMA register(0x%p):\n"
pr_debug("DMA register(0x%p):\n"
I2CTAG "INT_FLAG=%x,INT_EN=%x,EN=%x,RST=%x,\n"
I2CTAG "STOP=%x,FLUSH=%x,CON=%x,TX_MEM_ADDR=%x, RX_MEM_ADDR=%x\n"
I2CTAG "TX_LEN=%x,RX_LEN=%x,INT_BUF_SIZE=%x,DEBUG_STATUS=%x\n"
Expand All @@ -380,6 +380,6 @@ static void ccu_i2c_dump_info(struct mt_i2c *i2c)
(i2c_readl_dma(i2c, 0x80 + OFFSET_DEBUG_STA)),
(i2c_readl_dma(i2c, 0x80 + OFFSET_TX_MEM_ADDR2)),
(i2c_readl_dma(i2c, 0x80 + OFFSET_RX_MEM_ADDR2)));
pr_info("i2c_dump_info ------------------------------------------\n");
pr_debug("i2c_dump_info ------------------------------------------\n");

}
12 changes: 6 additions & 6 deletions drivers/misc/mediatek/ccu/src/2.1/ccu_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,17 +494,17 @@ static void ccu_i2c_dump_info(struct mt_i2c *i2c)
{
/* I2CFUC(); */
/* int val=0; */
pr_info("i2c_dump_info ++++++++++++++++++++++++++++++++++++++++++\n");
pr_info("I2C structure:\n"
pr_debug("i2c_dump_info ++++++++++++++++++++++++++++++++++++++++++\n");
pr_debug("I2C structure:\n"
I2CTAG "Clk=%d,Id=%d,Op=%x,Irq_stat=%x,Total_len=%x\n"
I2CTAG "Trans_len=%x,Trans_num=%x,Trans_auxlen=%x,speed=%d\n"
I2CTAG "Trans_stop=%u\n",
15600, i2c->id, i2c->op, i2c->irq_stat, i2c->total_len,
i2c->msg_len, 1, i2c->msg_aux_len, i2c->speed_hz,
i2c->trans_stop);

pr_info("base address 0x%p\n", i2c->base);
pr_info("I2C register:\n"
pr_debug("base address 0x%p\n", i2c->base);
pr_debug("I2C register:\n"
I2CTAG "SLAVE_ADDR=%x,INTR_MASK=%x,INTR_STAT=%x,CONTROL=%x,TRANSFER_LEN=%x\n"
I2CTAG "TRANSAC_LEN=%x,DELAY_LEN=%x,TIMING=%x,START=%x,FIFO_STAT=%x\n"
I2CTAG "IO_CONFIG=%x,HS=%x,DCM_EN=%x,DEBUGSTAT=%x,EXT_CONF=%x,TRANSFER_LEN_AUX=%x\n",
Expand All @@ -525,7 +525,7 @@ static void ccu_i2c_dump_info(struct mt_i2c *i2c)
(i2c_readw(i2c, OFFSET_EXT_CONF)), (i2c_readw(i2c,
OFFSET_TRANSFER_LEN_AUX)));

pr_info("DMA register(0x%p):\n"
pr_debug("DMA register(0x%p):\n"
I2CTAG "INT_FLAG=%x,INT_EN=%x,EN=%x,RST=%x,\n"
I2CTAG "STOP=%x,FLUSH=%x,CON=%x,TX_MEM_ADDR=%x, RX_MEM_ADDR=%x\n"
I2CTAG "TX_LEN=%x,RX_LEN=%x,INT_BUF_SIZE=%x,DEBUG_STATUS=%x\n"
Expand All @@ -546,5 +546,5 @@ static void ccu_i2c_dump_info(struct mt_i2c *i2c)
(i2c_readl_dma(i2c, OFFSET_DEBUG_STA)),
(i2c_readl_dma(i2c, OFFSET_TX_MEM_ADDR2)),
(i2c_readl_dma(i2c, OFFSET_RX_MEM_ADDR2)));
pr_info("i2c_dump_info ------------------------------------------\n");
pr_debug("i2c_dump_info ------------------------------------------\n");
}

0 comments on commit dfcf28c

Please sign in to comment.