From patchwork Tue Jul 27 03:59:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dong, Chuanxiao" X-Patchwork-Id: 59967 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 88453B70BE for ; Tue, 27 Jul 2010 14:00:32 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OdbK0-0000ir-Jx; Tue, 27 Jul 2010 03:59:16 +0000 Received: from mga11.intel.com ([192.55.52.93]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OdbJw-0000hv-Qa for linux-mtd@lists.infradead.org; Tue, 27 Jul 2010 03:59:14 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 26 Jul 2010 20:57:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.55,265,1278313200"; d="scan'208,223";a="821892885" Received: from pgsmsx603.gar.corp.intel.com ([10.221.43.87]) by fmsmga001.fm.intel.com with ESMTP; 26 Jul 2010 20:58:58 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.239.4.112) by pgsmsx603.gar.corp.intel.com (10.221.43.87) with Microsoft SMTP Server (TLS) id 8.2.254.0; Tue, 27 Jul 2010 11:59:09 +0800 Received: from shsmsx502.ccr.corp.intel.com ([10.239.4.96]) by shsmsx601.ccr.corp.intel.com ([10.239.4.112]) with mapi; Tue, 27 Jul 2010 11:59:08 +0800 From: "Dong, Chuanxiao" To: "linux-mtd@lists.infradead.org" , "dedekind1@gmail.com" Date: Tue, 27 Jul 2010 11:59:07 +0800 Subject: [PATCH 4/6] mtd: denali.c: add and update KERN_ facility level in printk() Thread-Topic: [PATCH 4/6] mtd: denali.c: add and update KERN_ facility level in printk() Thread-Index: AcstQA+WmAYg+GCyS46LEWsMPDdHBQ== Message-ID: <5D8008F58939784290FAB48F549751981D4E9692BA@shsmsx502.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100726_235913_181910_779E79C9 X-CRM114-Status: GOOD ( 16.88 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.55.52.93 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: "Yuan, Hang" , "Woodhouse, David" , "Gao, Yunpeng" X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From f1ccbae296ef39324fcfb26b86f4fa5ece528ec5 Mon Sep 17 00:00:00 2001 From: Chuanxiao Dong Date: Tue, 27 Jul 2010 10:48:34 +0800 Subject: [PATCH 4/6] mtd: denali.c: add and update KERN_ facility level in printk() Signed-off-by: Chuanxiao Dong --- drivers/mtd/nand/denali.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index f850a65..55a7a39 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -138,7 +138,7 @@ static void denali_write32(uint32_t value, void *addr) iowrite32(value, addr); #if DEBUG_DENALI - printk(KERN_ERR "wrote: 0x%x -> 0x%x\n", value, (uint32_t)((uint32_t)addr & 0x1fff)); + printk(KERN_INFO "wrote: 0x%x -> 0x%x\n", value, (uint32_t)((uint32_t)addr & 0x1fff)); #endif } @@ -191,7 +191,7 @@ static void read_status(struct denali_nand_info *denali) write_byte_to_buf(denali, ioread32(denali->flash_mem + 0x10)); #if DEBUG_DENALI - printk("device reporting status value of 0x%2x\n", denali->buf.buf[0]); + printk(KERN_INFO "device reporting status value of 0x%2x\n", denali->buf.buf[0]); #endif } @@ -989,9 +989,9 @@ static void print_irq_log(struct denali_nand_info *denali) { int i = 0; - printk("ISR debug log index = %X\n", denali->idx); + printk(KERN_INFO "ISR debug log index = %X\n", denali->idx); for (i = 0; i < 32; i++) - printk("%08X: %08X\n", i, denali->irq_debug_array[i]); + printk(KERN_INFO "%08X: %08X\n", i, denali->irq_debug_array[i]); } #endif @@ -1018,7 +1018,7 @@ static irqreturn_t denali_isr(int irq, void *dev_id) denali->irq_debug_array[denali->idx++] = 0x10000000 | irq_status; denali->idx %= 32; - printk("IRQ status = 0x%04x\n", irq_status); + printk(KERN_INFO "IRQ status = 0x%04x\n", irq_status); #endif /* handle interrupt */ /* first acknowledge it */ @@ -1046,7 +1046,7 @@ static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask) do { #if DEBUG_DENALI - printk("waiting for 0x%x\n", irq_mask); + printk(KERN_INFO "waiting for 0x%x\n", irq_mask); #endif comp_res = wait_for_completion_timeout(&denali->complete, timeout); spin_lock_irq(&denali->irq_lock); @@ -1061,7 +1061,7 @@ static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask) denali->irq_status &= ~irq_mask; spin_unlock_irq(&denali->irq_lock); #if DEBUG_DENALI - if (retry) printk("status on retry = 0x%x\n", intr_status); + if (retry) printk(KERN_INFO "status on retry = 0x%x\n", intr_status); #endif /* our interrupt was detected */ break; @@ -1071,7 +1071,7 @@ static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask) spin_unlock_irq(&denali->irq_lock); #if DEBUG_DENALI print_irq_log(denali); - printk("received irq nobody cared: irq_status = 0x%x," + printk(KERN_INFO "received irq nobody cared: irq_status = 0x%x," " irq_mask = 0x%x, timeout = %ld\n", intr_status, irq_mask, comp_res); #endif retry = true; @@ -1263,7 +1263,7 @@ static void read_oob_data(struct mtd_info *mtd, uint8_t *buf, int page) denali->page = page; #if DEBUG_DENALI - printk("read_oob %d\n", page); + printk(KERN_INFO "read_oob %d\n", page); #endif if (denali_send_pipeline_cmd(denali, false, true, SPARE_ACCESS, DENALI_READ) == PASS) { @@ -1364,7 +1364,7 @@ static bool handle_ecc(struct denali_nand_info *denali, uint8_t *buf, } #if DEBUG_DENALI - printk("Detected ECC error in page %d: err_addr = 0x%08x," + printk(KERN_INFO "Detected ECC error in page %d: err_addr = 0x%08x," " info to fix is 0x%08x\n", denali->page, err_address, err_correction_info); #endif @@ -1589,7 +1589,7 @@ static uint8_t denali_read_byte(struct mtd_info *mtd) result = denali->buf.buf[denali->buf.head++]; #if DEBUG_DENALI - printk("read byte -> 0x%02x\n", result); + printk(KERN_INFO "read byte -> 0x%02x\n", result); #endif return result; } @@ -1598,7 +1598,7 @@ static void denali_select_chip(struct mtd_info *mtd, int chip) { struct denali_nand_info *denali = mtd_to_denali(mtd); #if DEBUG_DENALI - printk("denali select chip %d\n", chip); + printk(KERN_INFO "denali select chip %d\n", chip); #endif spin_lock_irq(&denali->irq_lock); denali->flash_bank = chip; @@ -1612,7 +1612,7 @@ static int denali_waitfunc(struct mtd_info *mtd, struct nand_chip *chip) denali->status = 0; #if DEBUG_DENALI - printk("waitfunc %d\n", status); + printk(KERN_INFO "waitfunc %d\n", status); #endif return status; } @@ -1624,7 +1624,7 @@ static void denali_erase(struct mtd_info *mtd, int page) uint32_t cmd = 0x0, irq_status = 0; #if DEBUG_DENALI - printk("erase page: %d\n", page); + printk(KERN_INFO "erase page: %d\n", page); #endif /* clear interrupts */ clear_interrupts(denali); @@ -1647,7 +1647,7 @@ static void denali_cmdfunc(struct mtd_info *mtd, unsigned int cmd, int col, struct denali_nand_info *denali = mtd_to_denali(mtd); #if DEBUG_DENALI - printk("cmdfunc: 0x%x %d %d\n", cmd, col, page); + printk(KERN_INFO "cmdfunc: 0x%x %d %d\n", cmd, col, page); #endif switch (cmd) { case NAND_CMD_PAGEPROG: @@ -1824,7 +1824,7 @@ static int denali_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) * ONFI timing mode 1 and below. */ if (onfi_timing_mode < -1 || onfi_timing_mode > 1) { - printk("Intel CE4100 only supports ONFI timing mode 1 " + printk(KERN_ERR "Intel CE4100 only supports ONFI timing mode 1 " "or below\n"); ret = -EINVAL; goto failed_enable;