From patchwork Wed Jan 11 14:23:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keng-Yu Lin X-Patchwork-Id: 135393 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 6B056B6EF3 for ; Thu, 12 Jan 2012 01:23:52 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Rkz5j-0000xC-5Q for incoming@patchwork.ozlabs.org; Wed, 11 Jan 2012 14:23:51 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Rkz5h-0000x6-On for fwts-devel@lists.ubuntu.com; Wed, 11 Jan 2012 14:23:49 +0000 Received: from business-89-133-214-90.business.broadband.hu ([89.133.214.90] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1Rkz5h-0003f9-KL; Wed, 11 Jan 2012 14:23:49 +0000 From: Keng-Yu Lin To: fwts-devel@lists.ubuntu.com Subject: [PATCH] lib: add PCIe ASPM configuration check in the batch test Date: Wed, 11 Jan 2012 15:23:45 +0100 Message-Id: <1326291825-25519-1-git-send-email-kengyu@canonical.com> X-Mailer: git-send-email 1.7.5.4 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com Signed-off-by: Keng-Yu Lin Acked-by: Alex Hung Acked-by: Colin King --- src/lib/src/fwts_aspm.c | 14 +++++++++++++- src/lib/src/fwts_framework.c | 4 ---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/lib/src/fwts_aspm.c b/src/lib/src/fwts_aspm.c index 3c3157a..8406f77 100644 --- a/src/lib/src/fwts_aspm.c +++ b/src/lib/src/fwts_aspm.c @@ -51,7 +51,7 @@ int fwts_facp_get_aspm_control(fwts_framework *fw, int *aspm) return FWTS_OK; } -int fwts_aspm_check_configuration(fwts_framework *fw) +int aspm_check_configuration(fwts_framework *fw) { int ret; int aspm_facp; @@ -66,3 +66,15 @@ int fwts_aspm_check_configuration(fwts_framework *fw) } +static fwts_framework_minor_test aspm_tests[] = { + { aspm_check_configuration, "PCIe ASPM configuration test." }, + { NULL, NULL } +}; + +static fwts_framework_ops aspm_ops = { + .description = "PCIe ASPM check.", + .minor_tests = aspm_tests +}; + +FWTS_REGISTER(aspm, &aspm_ops, FWTS_TEST_ANYTIME, FWTS_BATCH); + diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c index 7064c44..9898537 100644 --- a/src/lib/src/fwts_framework.c +++ b/src/lib/src/fwts_framework.c @@ -76,7 +76,6 @@ static fwts_option fwts_framework_options[] = { { "json-data-path", "j:", 1, "Specify path to fwts json data files - default is /usr/share/fwts." }, { "lp-tags-log", "", 0, "Output LaunchPad bug tags in results log." }, { "disassemble-aml", "", 0, "Disassemble AML from DSDT and SSDT tables." }, - { "aspm", "", 0, "Test ASPM configuration." }, { NULL, NULL, 0, NULL } }; @@ -968,9 +967,6 @@ int fwts_framework_options_handler(fwts_framework *fw, int argc, char * const ar case 31: /* --disassemble-aml */ fwts_iasl_disassemble_all_to_file(fw); return FWTS_COMPLETE; - case 32: /* --aspm */ - fwts_aspm_check_configuration(fw); - return FWTS_COMPLETE; } break; case 'a': /* --all */